Code Comments
Programming Forum and web based access to our favorite programming groups.Ammar Ibrahim wrote: > I have enabled APC for a high traffic website. Everything was working > fine for w. 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
Post Follow-up to this messageHey 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 w. 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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.