Search This Blog

Wednesday, August 14, 2013

PHP Warning: require_once(): Unable to allocate memory for pool

I am running Apache 2.2.15 + PHP 5.3.3 + APC php-pecl-apc-3.1.9 on CentOS / RHEL 6.4.
Getting the following warnings in the /var/log/httpd/error.log


[Wed Aug 14 21:12:19 2013] [error] [client 67.204.24.42] PHP Warning: require(): Unable to allocate memory for pool. in /var/www/mds/wordpress/wp-includes/admin-bar.php on line 25, referer: http://www.milliondollarserver.com/installing-vmware-tools-on-rhel-oel-centos-6-via-yum/
[Wed Aug 14 21:12:19 2013] [error] [client 67.204.24.42] PHP Warning: require_once(): Unable to allocate memory for pool. in /var/www/mds/wordpress/wp-content/plugins/jetpack/modules/omnisearch/omnisearch-core.php on line 27, referer: http://www.milliondollarserver.com/installing-vmware-tools-on-rhel-oel-centos-6-via-yum/
[Wed Aug 14 21:12:19 2013] [error] [client 67.204.24.42] PHP Warning: require_once(): Unable to allocate memory for pool. in /var/www/mds/wordpress/wp-content/plugins/jetpack/modules/omnisearch/omnisearch-comments.php on line 4, referer: http://www.milliondollarserver.com/installing-vmware-tools-on-rhel-oel-centos-6-via-yum/
[Wed Aug 14 21:12:19 2013] [error] [client 67.204.24.42] PHP Warning: require_once(): Unable to allocate memory for pool. in /var/www/mds/wordpress/wp-content/plugins/jetpack/modules/omnisearch/omnisearch-core.php on line 31, referer: http://www.milliondollarserver.com/installing-vmware-tools-on-rhel-oel-centos-6-via-yum/
[Wed Aug 14 21:12:19 2013] [error] [client 67.204.24.42] PHP Warning: require_once(): Unable to allocate memory for pool. in /var/www/mds/wordpress/wp-content/plugins/jetpack/modules/omnisearch/omnisearch-plugins.php on line 4, referer: http://www.milliondollarserver.com/installing-vmware-tools-on-rhel-oel-centos-6-via-yum/
[Wed Aug 14 21:12:19 2013] [error] [client 67.204.24.42] PHP Warning: require_once(): Unable to allocate memory for pool. in /var/www/mds/wordpress/wp-content/plugins/jetpack/modules/contact-form/admin.php on line 633, referer: http://www.milliondollarserver.com/installing-vmware-tools-on-rhel-oel-centos-6-via-yum/
[Wed Aug 14 21:12:19 2013] [error] [client 67.204.24.42] PHP Warning: require_once(): Unable to allocate memory for pool. in /var/www/mds/wordpress/wp-content/plugins/jetpack/class.jetpack-client.php on line 48, referer: http://www.milliondollarserver.com/installing-vmware-tools-on-rhel-oel-centos-6-via-yum/


To fix it:

# vi /etc/php.d/apc.ini
; increased to 128M from 64M
apc.shm_size=128M


Don't forget reboot the apache to apply changes:

# service httpd restart


If you would like to find out your APC memory usage and hit ratio:

# cp /usr/share/php-pecl-apc/apc.php /var/www/html
Edit /var/www/html/apc.php and set the admin password :
defaults('ADMIN_PASSWORD','NEW-PASSWORD');
Save and close the file. Fire a web-browser and type the url:
http://server-ip/apc.php

2 comments:

  1. Thank you.Its working fine.

    ReplyDelete
  2. These are truly impressive ideas in about blogging.
    You have touched some pleasant things here. Any way keep up wrinting.

    ReplyDelete