Vianney Sserwanga
Vianney Sserwanga

Reputation: 313

Nitrogen SimpleCache Mutex signkey issue

Nitrogen seems to be running properly until it starts throwing these warning messages.

It throws these warnings.

=WARNING REPORT==== 2-Jul-2022::10:18:25 ===
SimpleCache: Mutex "{nitrogen,signkey}" timed out after 10 seconds. Something might be 
wrong. Trying again.
=WARNING REPORT==== 2-Jul-2022::10:18:39 ===
SimpleCache: Mutex "{nitrogen,{ensure_loaded,dot}}" timed out after 10 seconds. 
Something might be wrong. Trying again.
=WARNING REPORT==== 2-Jul-2022::10:19:16 ===
SimpleCache: Mutex "{nitrogen,signkey}" timed out after 10 seconds. Something might be 
wrong. Trying again.

The crashe handler crashes with this message

=INFO REPORT==== 2-Jul-2022::10:18:19 ===
Crash Handler Crashed:
{throw,{simple_cache_failed,nitrogen,1000,signkey,#Fun<wf_pickle.0.36987981>},
       [{simple_cache,get,5,[{file,"src/simple_cache.erl"},{line,92}]},
        {default_cache_handler,get_cached,5,
                               [{file,"src/handlers/cache/default_cache_handler.erl"},
                                {line,59}]},
        {wf_handler,call,3,[{file,"src/lib/wf_handler.erl"},{line,37}]},
        {cache_handler,get_cached,3,
                       [{file,"src/handlers/cache/cache_handler.erl"},
                       {line,43}]},
       {wf,cache,3,[{file,"src/wf.erl"},{line,430}]},
        {wf_pickle,pickle,1,[{file,"src/lib/wf_pickle.erl"},{line,28}]},
       {wf_event,generate_postback_script,7,
                  [{file,"src/lib/wf_event.erl"},{line,72}]},
       {action_event,render_action,1,
                      [{file,"src/actions/action_event.erl"},{line,32}]}]}

I also keep getting this error even though simple cache is already started

=INFO REPORT==== 2-Jul-2022::10:41:41 ===
{error,first_request,
{url,"servers/"},
{exit,
    {failure_to_deserialize_page_context,
        [{serialized_page_context,
       <<"GBqhfsgYvoUIZZt7E4ouOknMW1i9TrEXWG2Gp9Uxrll7lnLlRDsjAku3_QC0CyQ1km8ZLgZgUbY18ehPzkBzvoKLfa1S7LXfQnCdO1seo9NvqEExZP9Cxz...">>},
         {suggestion,
             "The most common cause of this is that simple_cache is not started. Try running: application:start(simple_cache)."}]},
    [{wf_core,deserialize_context,1,[{file,"src/wf_core.erl"},{line,187}]},
     {wf_core,run_catched,0,[{file,"src/wf_core.erl"},{line,84}]},
     {wf_core,run,0,[{file,"src/wf_core.erl"},{line,23}]},
     {yaws_server,deliver_dyn_part,8,
         [{file,"src/yaws_server.erl"},{line,2882}]},
     {yaws_server,aloop,4,[{file,"src/yaws_server.erl"},{line,1251}]},
     {yaws_server,acceptor0,2,[{file,"src/yaws_server.erl"},{line,1074}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}}

What could be the cause of this?

Upvotes: 1

Views: 27

Answers (1)

chops
chops

Reputation: 2612

There is a known bug in earlier versions of SimpleCache where in some cases, a cache request that crashes is not caught by the mutex server.

This has been fixed in the latest versions - what I'd do is pull the most recent simple_cache master (which will pull nitro_cache as a dependency).

simple_cache was renamed nitro_cache a little over a year ago to avoid namespace clashes, with the original simple_cache being converted to be an alias of nitro_cache.

Upvotes: 0

Related Questions