Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
             total       used       free     shared    buffers     cached
Mem:          1024       1020          3          0          0        859
-/+ buffers/cache:        160        863

With 863 "free" for programs, everything is getting memory issues. All webpages have

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

How can I figure out what the hell is eating up 859mb of memory in the cache and free it up?

I'm using nginx with php-fpm and mysql.

share|improve this question
That's probably not the problem. What is your php-fpm configuration for your pool? And, is this an OpenVZ VPS? – Michael Hampton Jul 13 '12 at 0:24
First of all find out who exactly is using most of your memory. Use top or ps. – golja Jul 13 '12 at 0:24
Its a vps provided by my hosting, thats all that I know. What would you like to know about the php-fpm configuration? I have it set to dynamic, 10 max, 5 start, 3 spare min, 8 spare max. (I could go higher, but I dont see the need with the current load). I ran a load test with 500 concurrent connections earlier today after I changed the settings and it worked fine. – iargue Jul 13 '12 at 0:29
Your php-fpm settings sound fine. First try restarting php-fpm. If you still have this same trouble, it's probably a problem with the hosting provider. This is why I won't touch OpenVZ-based VPSes with a ten foot pole... – Michael Hampton Jul 13 '12 at 0:38
Linux is supposed to be using all the free memory as disk cache. This is not something you can (or even should) turn off. IF a program actually needs the memory, it will be able to get it - unless you're using an OpenVZ VPS. – Michael Hampton Jul 13 '12 at 1:15

The issue was with APC. I was using the full 64mb of the cache. I increased it to 120mb and everything seems to be working smoothly now.

For anyone else having this issue, to increase your cache size, go to php.ini (or php.d directory and find apc.ini if it exists) and add or change


To whatever the value that you want it to be.

share|improve this answer
I'd accept this answer so people can view it as part of the wiki in the future. – Matthew Jul 13 '12 at 19:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.