Page 1 of 1

APC errors after last update

Posted: Tue Dec 28, 2010 10:10 pm
by magneticat
Today I upgraded our system, including PHP and MySQL, using ASL repository. All works fine, but on some of our websites we are now getting this error, apparently randomly:

Warning: Unknown: Unable to allocate memory for pool. in Unknown on line 0

Dozens of times in the same PHP script. This looks like to be related to APC, but we have the latest APC release installed. Is anybody else experiencing this?

Thanks, will post here if I find a solution.

Re: APC errors after last update

Posted: Wed Dec 29, 2010 4:54 am
by BruceLee
...upgraded our system, including PHP and MySQL...
To which version of PHP and APC and how does the vhost run (as apache module, cgi, fcgid)?

What do the complete logs say, or is this the only error?

Always the same script seems like the script might be buggy or not compatible if changed to 5.3?
It might happen as soon as the APC shared memory usage reaches 100%.
Have you checked with apc.php and tried increasing the memory amount for APC?

Re: APC errors after last update

Posted: Wed Dec 29, 2010 10:37 am
by magneticat
Bruce, thanks for answering me.

It happens with all scripts on the server, including Wordpress.

I have changed the memory limit and the errors were gone for a while, I think I will try raising them a bit more.

Will keep you posted!

Thanks!

Re: APC errors after last update

Posted: Thu Dec 30, 2010 11:28 pm
by magneticat
Indeed, playing a bit with the settings helped. I still get some errors when the memory is full, but with little adjustments I should get things working OK.

Current settings I am trying are:

Code: Select all

apc.enabled=1
apc.shm_segments=3
apc.optimization=0
apc.shm_size=90
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1
apc.cache_by_default=1