Summary: | Cache::Memory should not be used as L2 cache | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | critical | ||
Priority: | P5 - low | CC: | dcook, fridolin.somers, jesse, julian.maurice, martin.renvoize, mtj, nick |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19523 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
Cache::Memory fails to work correctly under a plack environment as the cache cannot be shared between processes.
|
Version(s) released in: | |
Attachments: |
Bug 21955: Remove Cache::Memory as fallback for L2 cache
Bug 21955: Remove Cache::Memory as fallback for L2 cache Bug 21955: Remove Cache::Memory as fallback for L2 cache |
Description
Jonathan Druart
2018-12-05 18:33:30 UTC
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 |