Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] 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
Reporter koreth View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 4.0.0
  Product Build
Summary 0003457: Objects without TTLs still disappear from APC
Description 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.
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0003966)
koreth
04-26-09 10:12

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.
 

- Issue History
Date Modified Username Field Change
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.
Powered by Mantis Bugtracker