Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

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

Report this thread to moderator Post Follow-up to this message
Old Post
Rasmus Lerdorf
02-09-05 09:00 AM


RE: [PECL-DEV] APC shared Memory Problem
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 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

Report this thread to moderator Post Follow-up to this message
Old Post
Shannon M. Werb
02-10-05 02:01 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP PECL archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:21 AM.

 

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.