PHP FPM Keeps Eating Memory Until My Website Crashes
I have a server with 30 GB RAM, 800 GB SSD & 8 CORES.
I am using WHM & CPANEL, When I Turn on PHP FPM For my Website from WHM then the PHP FPM Keeps Eating All the Memory ( upto 30 GB ) & Finally My Website Crashes.
My System PHP FPM Configuration is : 800 Max Requests, 250 Max Children, Process Idle Timeout: 30
I tried changing this configuration, But It just makes the eating of memory slow or fast ( But It reaches 30 GB & Crashes my Website ).
If I turn off the PHP FPM, Then My Server Load Increases Automatically and goes up to 25 but the Memory is always under 4 GB. So Currently I have Turned off the PHP FPM.
I am using Apache. What is the solution for this? Please help.
-
Have you checked the PHP-FPM error logs for any indication of what is going on when PHP-FPM is consuming more memory than anticipated? The error logs are located per PHP version in the following location: /opt/cpanel/ea-phpXX/root/var/log/php-fpm/error.log
0 -
Hi, These are the warning and errors I saw in error.log file: [12-Oct-2020 10:41:02] WARNING: [pool domain_com] child 18510 said into stderr: " " [12-Oct-2020 10:41:24] WARNING: [pool domain_com] child 18543 said into stderr: " " [12-Oct-2020 10:41:24] WARNING: [pool domain_com] child 18433 said into stderr: " " [12-Oct-2020 10:41:45] WARNING: [pool domain_com] child 18554 said into stderr: " " [12-Oct-2020 10:41:45] WARNING: [pool domain_com] child 18459 said into stderr: " " [12-Oct-2020 10:41:50] WARNING: [pool domain_com] child 18398 said into stderr: " " [12-Oct-2020 10:42:07] WARNING: [pool domain_com] child 18495 said into stderr: " " [12-Oct-2020 10:42:24] NOTICE: Reloading in progress ... [12-Oct-2020 10:42:34] NOTICE: reloading: execvp("/opt/cpanel/ea-php73/root/usr/sbin/php-fpm", {"/opt/cpanel/ea-php73/root/usr/sbin/php-fpm", "--nodaemonize"}) [12-Oct-2020 10:42:34] WARNING: Nothing matches the include pattern '/opt/cpanel/ea-php73/root/etc/php-fpm.d/*.conf' from /opt/cpanel/ea-php73/root/etc/php-fpm.conf at line 8. [12-Oct-2020 10:42:34] ERROR: No pool defined. at least one pool section must be specified in config file [12-Oct-2020 10:42:34] ERROR: No pool defined. at least one pool section must be specified in config file [12-Oct-2020 10:42:34] ERROR: failed to post process the configuration [12-Oct-2020 10:42:34] ERROR: failed to post process the configuration [12-Oct-2020 10:42:34] ERROR: FPM initialization failed [12-Oct-2020 10:42:34] ERROR: FPM initialization failed
0 -
Hi, I Solved the problem. I was using a library for sending curl request which was using a lot of memory. I changed the library and it it is working fine. 0
Please sign in to leave a comment.
Comments
3 comments