Re: APC shared Memory Problem
| From: | Ammar Ibrahim | Date: | Wed, 09 Feb 2005 08:09:39 +0000 |
| Subject: | Re: APC shared Memory Problem | ||
| References: | 1 2 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-1921@lists.php.net to get a copy of this message | ||
I increased the number of segments
apc.shm_segments=3
Everything seems to be working fine. I'm keeping my eyes open on the
memory usage.
On Tue, 08 Feb 2005 21:14:32 -0800, Rasmus Lerdorf <rasmus@lerdorf.com> wrote:
> 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
>