≡ Menu

PHP: Require_once(): Unable To Allocate Memory For Pool Error and Solution

I‘m running PHP version 5.3.3 on CentOS / RHEL 6.x with APC php-pecl-apc-3.1.9. However, I’m getting the following warnings in my php server log file:

[01-Jul-2012 10:50:49] PHP Warning: require_once(): Unable to allocate memory for pool. in /var/www/html/includes/admin.php on line 57
[18-Jul-2012 17:00:08] PHP Warning: include_once(): Unable to allocate memory for pool. in //var/www/html/includes/xmlrpc.php on line 55
[18-Jul-2012 17:00:40] PHP Warning: require(): Unable to allocate memory for pool. in /var/www/html/includes/geshi.php on line 2307

How do I fix these php warnings?

Save and close the file. Fire a web-browser and type the url:
Sample outputs:

Apc Memory Status and Hit Ratio

Fig.01: Apc Memory Status and Hit Ratio

From the above graph I’m getting 100.0% hit ratio and I’ve used almost all memory. I need to increase memory and reduce ttl value so that I will not get memory allocation error.

  1. PHP APC documentation.
Share this tutorial on:
{ 9 comments… add one }
  • Daniel October 24, 2012, 7:11 am

    Thanks for the detailed informations. This fix worked for me.

    Greetings from Germany

  • Arindam Biswas December 3, 2012, 12:49 pm

    Thank you. Nicely written. Your good deed of the day!


  • Igor January 5, 2013, 7:22 pm

    Thank you for the explanation, it helped me to solve this problem.

  • Justin C. February 15, 2013, 3:03 pm

    Worked for me! Thanks!

  • Nicram March 31, 2014, 12:02 pm

    Great article. Today i saw same problem on my box and was trying to know what happen. It was first site and it work now. thank You!

  • rosh3000 April 8, 2014, 3:34 pm

    Thank you. A little more explanation on how to interpreter the results in apc.php and what the graph should be like would be very useful.

  • HÆ°ng May 26, 2015, 4:47 am

    Thank you, Unbelievable your helped!

  • robin August 31, 2015, 8:01 am

    Worked for me! Thanks!

  • anton December 28, 2015, 2:44 am

    nice explain. thanks

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , , , ,