Re: APC shared Memory Problem
| From: | Jon Drukman | Date: | Mon, 28 Feb 2005 23:34:01 +0000 |
| Subject: | Re: APC shared Memory Problem | ||
| References: | 1 2 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-2097@lists.php.net to get a copy of this message | ||
Rasmus Lerdorf wrote:
Ammar Ibrahim wrote:I'm having the same error as the original poster. I created 10 segments giving me 300MB to play with. Once they fill up, I get the apc-warning in the Apache error_log (would be nice if this could stop after it happens once, it generates 1000's of lines in no time at all), and then my Apache children start core dumping like crazy. PHP 4.3.9, Apache 2.0.52 (prefork mode). The apc.filter directive in 2.0.4 is insufficient for really tuning exactly what I need cached (unfortunately my site layout is really sloppy and consists of just a few directories I *want* cached... the exclusion list would be prohibitively long). I'll try the CVS version to see if it helps. -jsd-I have enabled APC for a high traffic website. Everything was working fine for week. Then Suddenly I started to get 500 internal Server Error. Checking the apache error Log gives me: "... [apc-warning] unable to cache '..... .php': insufficient shared memory available"The version of APC you have doesn't do any sort of cache expiry. Once you fill the cache, that's it. Further files will not be cached and you will get that warning in your logs. It shouldn't be sending a 500 because of this, nor should it crash. Your crash may very well be unrelated, although it doesn't handle running out of shared memory all that gracefully. You have a couple of options. Either disable caching for everything except your most accessed pages to make sure you never run out of shared memory, or try the current cvs version from cvs.php.net/pecl/apc which has a bunch of new code to help address this very problem. See the bottom half of the INSTALL file in CVS for a list of the new directives available.