If Plack is running with several workers we must not use Cache::Memory as L2 cache. If a value is set from a worker, it will not be available from other workers as the Cache::Memory instance is not shared (of course!) Moreover we now have Koha::Cache::Memory::Lite that does the same job, so we should not expect performance regressions by removing it.
Created attachment 82890 [details] [review] Bug 21955: Remove Cache::Memory as fallback for L2 cache If Plack is running with several workers we must not use Cache::Memory as L2 cache. If a value is set from a worker, it will not be available from other workers as the Cache::Memory instance is not shared (of course!) Moreover we now have Koha::Cache::Memory::Lite that does the same job, so we should not expect performance regressions by removing it. See also the email sent to koha-devel for more info http://lists.koha-community.org/pipermail/koha-devel/2018-December/045004.html
Maybe the severity can be adjusted later if not considered as critical.
Created attachment 83007 [details] [review] Bug 21955: Remove Cache::Memory as fallback for L2 cache If Plack is running with several workers we must not use Cache::Memory as L2 cache. If a value is set from a worker, it will not be available from other workers as the Cache::Memory instance is not shared (of course!) Moreover we now have Koha::Cache::Memory::Lite that does the same job, so we should not expect performance regressions by removing it. See also the email sent to koha-devel for more info http://lists.koha-community.org/pipermail/koha-devel/2018-December/045004.html Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
I'm fully behind this, signing off.
I cannot reproduce the issue you mentioned on the ML. about.pl says > Effective caching method: Cache::Memory I have 2 starman workers but reloading the page always show the right value for the syspref. What am I missing ?
(In reply to Julian Maurice from comment #5) > I cannot reproduce the issue you mentioned on the ML. > > about.pl says > > > Effective caching method: Cache::Memory > > I have 2 starman workers but reloading the page always show the right value > for the syspref. > What am I missing ? Can you confirm you are displaying the pref's value using the Koha.Preference method, i.e. not looking at the pref admin view, which fetches the value from the DB directly? Also make sure starman's parameter --max-requests is not set to 1 :)
Ah sorry, I saw 2 starman processes and interpreted that as 2 workers, but it was the master and 1 worker. If I increase the number of workers, I can reproduce the problem indeed.
Created attachment 83034 [details] [review] Bug 21955: Remove Cache::Memory as fallback for L2 cache If Plack is running with several workers we must not use Cache::Memory as L2 cache. If a value is set from a worker, it will not be available from other workers as the Cache::Memory instance is not shared (of course!) Moreover we now have Koha::Cache::Memory::Lite that does the same job, so we should not expect performance regressions by removing it. See also the email sent to koha-devel for more info http://lists.koha-community.org/pipermail/koha-devel/2018-December/045004.html Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Awesome work all! Pushed to master for 19.05
Pushed to 18.11.x for 18.11.01
Pushed to 18.05.x for 18.05.07
Pushed to 17.11.x for 17.11.13
*** Bug 16104 has been marked as a duplicate of this bug. ***