Unable to allocate memory for pool

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

APC or Alternative PHP Cache (APC) is a free and open opcode cache for PHP. APC allows for caching of opcode generated during PHP script parsing and execution by the Zend engine. If you are using APC 3.1.9 and you are using the default configuration you might run into the error where most PHP requests will return a warning message “PHP Warning: Unknown: Unable to allocate memory for pool. in Unknown on line 0”
The error is that APC cache ran out of memory and a new cache item could not be inserted. The solution to the problem is to change APC configuration settings and decrease apc.ttl and increase apc.shm_size.

You can optimize these values in your php.ini file.

Example

apc.shm_size=300M
apc.mmap_file_mask=/dev/zero

If APC is compiled to use Shared Segment Memory you will be limited by your operating system. Type this command to see your system limit for each segment :

sysctl -a | grep -E "shmall|shmmax"

To allocate more memory you’ll have to increase the number of segments with the parameter apc.shm_segments.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to disable user Custom PHP.INI files

Disable user unwanted custom php.ini file in your cpanel server. suPHP is a module that enhances...

How To Install eAccelerator on cpanel

eAccelerator is a free, open-source piece of software used to speed up PHP loading on websites....

Test MySQL database connection with php script

You can use the following php script which is used to test mysql database connection on your...

Important php security settings

PHP is a server side scripting language. You can embed PHP code in your web pages along with...

Enable Custom php.ini for Fast CGI

With fast-cgi, custom php.ini needs to be in the cgi-bin folder. 1) Move php.ini to cgi-bin...

Powered by WHMCompleteSolution