|Anonymous | Login | Signup for a new account||07-02-2020 05:10 PDT|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details [ Jump to Notes ]||[ View Advanced ] [ Issue History ] [ Print ]|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0003457||[Quercus]||major||always||04-24-09 09:10||04-26-09 10:12|
|Summary||0003457: Objects without TTLs still disappear from APC|
Whenever I leave Quercus running on a test server for an extended period, I eventually find that the application log full of error messages about its configuration data being missing from APC (the config data is loaded at app startup.) I've configured APC to be large enough that it should never have to expire any entries via LRU, and in any case these configuration entries are pretty frequently used.
I believe the root cause is that the values in APC are stored as UnserializeCacheEntry objects, which use soft references. So what's probably going on is that the garbage collector runs at some point and decides it needs to reclaim the memory from some or all of those soft references -- which is of course done without regard to where in the LRU queue those objects are. That is, an entry that gets used in every request is nearly as likely to be reaped as one that never gets used at all.
There should be a way of making an object non-reapable, though obviously there's value in letting the GC clean up objects that can safely go away so I'm not suggesting getting rid of that aspect of Quercus' APC implementation altogether. (That said, given a choice between no GC reaping of APC objects and the current situation, the former would be preferable.)
Maybe one way to tell the difference is by TTL? An APC entry with a nonzero TTL is probably safe to let the GC get rid of, whereas one with a zero TTL may be very expensive or impossible to recompute on the fly.
|A temporary workaround is to use the -XX:SoftRefLRUPolicyMSPerMB option, which controls how long soft references are retained after last access. The default is 1000. But obviously that option affects *all* soft references, not just the APC ones.|
|04-24-09 09:10||koreth||New Issue|
|04-26-09 10:12||koreth||Note Added: 0003966|
| Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed.|
25 unique queries executed.