Re: Problems using APC
| From: | shire | Date: | Thu, 11 Sep 2008 17:30:45 +0000 |
| Subject: | Re: Problems using APC | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-5748@lists.php.net to get a copy of this message | ||
On Sep 10, 2008, at 11:26 PM, David Park wrote:
Hi All, I just installed APC on my server that is running PHP and the APC appears to be randomly crashing. Below are the symptoms that my server is experiencing and the configuration of my system. Has anyone seen this type of problem with APC and can you give me any advice to fix it? *Symptom #1 - APC appears to be stable but then restarts after a couple hours with no page requests* 1. Reboot server 2. Load apc.php. It shows that the cache is empty except for one or two system files. These are the files that are used to create the apc.php page. 3. Load some other PHP pages. And re-load apc.php after each pageview. The cache starts filling up with other cached items and the hit rate goes up. 4. Leave the server alone for a couple hours. 5. Load apc.php. It shows that the cache is empty. Also, the cache uptime is less than an hour - in other words, the cache appears to have restarted itself.APC will currently flush all entries in the cache once it's full (I'm currently working on a LFU implementation as an alternative to this functionality). So if you're cache size isn't large enough to hold all the files/entries you plan to put in it it will flush when it meets it's capacity out and start over again. To verify this is what is happening there should be an "expunge" counter on the apc.php page. If you have enough available memory on your system I would increase your shared memory segment so that you can fill it up with a little room left over to grow. I would also monitor this as time goes forward for any changes so you can adjust accordingly. If you can't increase the memory size, then you may need to either see if your system can work suitably by allowing the cache to flush every so often, or (probably a better option) you could use the filter setting to filter out pages that aren't used often or aren't of high concern performance wise. -shire