Applicable to:
- Plesk Obsidian for Linux
- Plesk for Linux
Symptoms
- The server is slow. Websites take too long to load;
-
The command below shows high RAM usage:
# free -h
-
The command below shows more PHP-FPM child processes than allowed under pm.max_children in Domains > example.com > PHP Settings:
# ps faux | grep fpm
...
root 2482 0.0 0.2 583108 20784 ? Ss Jan16 0:55 php-fpm: master process (/opt/plesk/php/7.4/etc/php-fpm.conf)
exampl+ 17707 4.0 0.2 583800 22940 ? S 15:28 0:00 _ php-fpm: pool example.com
exampl+ 17707 4.0 0.2 583800 22940 ? S 15:28 0:00 _ php-fpm: pool example.com
exampl+ 17707 4.0 0.2 583800 22940 ? S 15:28 0:00 _ php-fpm: pool example.com
exampl+ 17707 4.0 0.2 583800 22940 ? S 15:28 0:00 _ php-fpm: pool example.com
exampl+ 17707 4.0 0.2 583800 22940 ? S 15:28 0:00 _ php-fpm: pool example.com
exampl+ 17707 4.0 0.2 583800 22940 ? S 15:28 0:00 _ php-fpm: pool example.com
exampl+ 17707 4.0 0.2 583800 22940 ? S 15:28 0:00 _ php-fpm: pool example.com
exampl+ 17707 4.0 0.2 583800 22940 ? S 15:28 0:00 _ php-fpm: pool example.com
exampl+ 17707 4.0 0.2 583800 22940 ? S 15:28 0:00 _ php-fpm: pool example.com
exampl+ 17707 4.0 0.2 583800 22940 ? S 15:28 0:00 _ php-fpm: pool example.com
...
exampl+ 17707 4.0 0.2 583800 22940 ? S 15:28 0:00 _ php-fpm: pool example.com
Cause
The "pm" variable PHP Settings is set to "ondemand", which means that the server will spawn as many PHP-FPM processes as required by the site, ignoring the pm.max_children variable.
Resolution
-
Go to Domains > example.com > PHP Settings
-
Under pm, choose either static (the domain will always have the same amount of child processes) or dynamic (the number of child processes will grow as required, but will be limited by pm.child_processes).
Comments
0 comments
Please sign in to leave a comment.