[erlang-questions] release upgrades and code loading

Ivan Uemlianin ivan@REDACTED
Thu Feb 13 19:34:22 CET 2014


Dear Paul

Thanks for your comment.

Yes, in the relup file everythnig looks in place: load_object_code, 
brutal_purge, code_change up, resume, etc.

Ivan


On 13/02/2014 18:08, Paul Davis wrote:
> Have you looked at the generated relup to make sure it includes the
> appropriate instructions for upgrade the modules in question?
>
> On Thu, Feb 13, 2014 at 12:00 PM, Ivan Uemlianin <ivan@REDACTED> wrote:
>> Dear All
>>
>> I am just getting started with live release upgrades, using relx and
>> following this tutorial:
>>
>>    http://blog.troutwine.us/2013/09/13/trivial_otp_releases.html
>>
>> Everything seems to work as advertised, except sometimes I need to
>> explicitly load the code into the running vm (i.e., using code_load_file/1)
>> for the new stuff to take effect.  The function
>> release_handler:which_releases/0 reports the new release as active and
>> permanent, but I can see from behaviour that old versions of certain modules
>> are still running and handling data.
>>
>> I can't be much more specific I'm afraid.  One example: one application uses
>> cowboy.  If a release upgrade changes a cowboy resource module, the new
>> release version might still be running the old version of that module until
>> I load_file and purge.
>>
>> Why might this be happening?  Am I missing something in the packaging and
>> upgrade process?  Is there a better way I can write my modules?
>>
>> If the information above is too vague, what should I look out for next time
>> this happens?
>>
>> With thanks and best wishes
>>
>> Ivan
>>
>>
>> --
>> ============================================================
>> Ivan A. Uemlianin PhD
>> Llaisdy
>> Speech Technology Research and Development
>>
>>                      ivan@REDACTED
>>                       www.llaisdy.com
>>                           llaisdy.wordpress.com
>>                github.com/llaisdy
>>                       www.linkedin.com/in/ivanuemlianin
>>
>>                          festina lente
>> ============================================================
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions

-- 
============================================================
Ivan A. Uemlianin PhD
Llaisdy
Speech Technology Research and Development

                     ivan@REDACTED
                      www.llaisdy.com
                          llaisdy.wordpress.com
               github.com/llaisdy
                      www.linkedin.com/in/ivanuemlianin

                         festina lente
============================================================



More information about the erlang-questions mailing list