Welcome! Log In Create A New Profile

Advanced

Unable to allocate memory?

Posted by Jonathan Langevin 
Jonathan Langevin
Unable to allocate memory?
October 12, 2010 09:28AM
Migrated an Apache/mod_php server to nginx/php-fpm this weekend, running
Moodle (inefficient PHP LMS).

I'm now seeing a large number of these errors in the domain's error log,
sent up by FastCGI (FPM).
PHP Warning: Unknown: Unable to allocate memory for pool. in Unknown on
line 0

These errors aren't limited to a single page either, it appears quite
widespread.
I just enabled the setting in FPM to make the child processes restart after
500 requests, to see if that would help (hoping it was a memory leak issue),
but within 2 minutes after restarting FPM, errors started showing up again.
INI allows 256M memory, and I can increase that if needed, but I'm hoping
what I'm seeing is instead a configuration error on my part, in FPM?

PHP 5.3.3 + FPM, nginx 0.7.65, Centos 5.5

FPM config below, with all commented values removed to shorten the content.

----------------------------------------------------------------------------------------------------------------------

[www]
listen = 127.0.0.1:9000
listen.allowed_clients = 127.0.0.1
user = nginx
group = nginx
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
pm.max_requests = 500
pm.status_path = /status
slowlog = /var/log/php-fpm/www-slow.log
catch_workers_output = yes
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 280
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready