Technology

server reached pm.max_children setting (10), consider raising it.

We calculate based on the following formula:

pm.max_children = Total RAM dedicated to the web server / Max child process size

To calculate the amount of RAM used by each 1 php-fpm child process

ps –no-headers -o “rss,cmd” -C php-fpm | awk ‘{ sum+=$1 } END { printf (“%d%s\n”, sum/NR/1024,”M”) }’

To raise the limit globally, change directadmin.conf value first:

cd /usr/local/directadmin/

./directadmin set php_fpm_max_children_default 100

cd /usr/local/directadmin/custombuild

./build rewrite_confs
service php-fpm74 restart

File log PHP FPM

tail -f /var/log/php-fpm/error.log

Config file

[php-fpm-pool-settings]
pm = dynamic
pm.max_children = 25
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.max_requests = 500
admin

Recent Posts

Create PHP-FPM Status Page for nginx+php-fpm in directadmin

Go to Custom HTTPD ConfigurationSelect the php-fpm version you are running for the domain you…

3 years ago

Renew Let’s Encrypt For Domains Command Line

cd /usr/local/directadmin/scripts ./letsencrypt.sh renew [domain.com] 4096

4 years ago

Install VPN Server by script openvpn-install

I would like to introduce to you, the simplest and easiest way to install OpenVPN…

4 years ago

Instructions to upgrade DirectAdmin version

cd /usr/local/directadmin/custombuild/ ./build update ./build update_da

4 years ago

Directadmin change httpd to nginx

cd /usr/local/directadmin/custombuild ./build set webserver nginx ./build update ./build set php1_mode php-fpm ./build set php2_mode…

4 years ago

Directadmin upgrade/downgrade PHP version

vi /usr/local/directadmin/custombuild/options.conf #here you can modify 7.4 to 7.3./build update./build php n

4 years ago