New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
APC cache resets itself?
Installed php-apc on Ubuntu 12.04 via apt-get.
The issue is that the cache seems to "reset" itself all the time, so nothing gets cached for more than 10-20 seconds, and then the cache is suddenly empty again.
I'm running Webmin and suspect this issue has something to do with it, but haven't been able to find anything on their support forums.
Does anyone know how to approach this problem? Thanks!
Comments
Have you checked each of the php configuration for APC relating to the cache?
http://www.php.net/manual/en/apc.configuration.php
Not sure if this will be of any help.
http://www.php.net/manual/en/function.apc-cache-info.php
Never heard of this problem before. Have you installed the APC Admin to take a closer look?
Also, are you sure you're not setting a low TTL, causing the cache entries to be unset? OR have you checked the APC conf (for a low TTL there)?
Yup! That's where I see that the cache gets emptied.
Is it possible that APC Admin is showing the wrong information? Here is a screenshot of the problem: http://i.imgur.com/sKRxx.png
As you can see the hits and misses counter actually goes down after a refresh. If i refresh a couple of more time the counters just around randomly, both up and down.
Do you have any scripts restarting PHP processes?
I don't, but Webmin might. Also, from the way the hit/miss numbers bounce up and down it's almost as if I have two APC caches running at once. Is that possible?
@littleguy Webmin shouldn't affect PHP/APC at all.
I found the problem. On Webmin every configured site runs php on its own user. Due to this, every user has their own individual APC cache.
This is not really the behaviour I am looking for. I'd like a global cache. Is this possible to configure?
See above.
@littleguy Yeah that makes sense, run PHP as nobody or a shared user. I use APC on my own servers, and PHP is ran as nobody.
https://helpdesk.wiredtree.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=1663
http://www.litespeedtech.com/support/forum/archive/index.php/t-4189.html