RE: [PECL-DEV] APC shared Memory Problem
| From: | Shannon M. Werb | Date: | Wed, 09 Feb 2005 21:19:18 +0000 |
| Subject: | RE: [PECL-DEV] APC shared Memory Problem | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-1938@lists.php.net to get a copy of this message | ||
Hey Rasmus,
Have you updated it at all since we chatted back in August of last year?
Hope all is well...
Regards,
Shannon
-----Original Message-----
From: Rasmus Lerdorf [mailto:rasmus@lerdorf.com]
Sent: Tuesday, February 08, 2005 11:15 PM
To: Ammar Ibrahim
Cc: pecl-dev@lists.php.net
Subject: Re: [PECL-DEV] APC shared Memory Problem
Ammar Ibrahim wrote:
> 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"
>
> Did anybody run into this problem? Do I need to raise Kernel Shared
> memory restrictions and/or apc.shm*?
>
> And is there a way to disable APC automatically when this happens
> again? can I give APC unlimited memory?
>
> I'd appreciate anyhelp here, thanks
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.
-Rasmus
--
PECL development discussion Mailing List (http://pecl.php.net/) To
unsubscribe, visit: http://www.php.net/unsub.php