How to check if some site filled all PHP-FPM slots or reached request_terminate_timeout

Post Reply
User avatar
Site Admin
Posts: 932
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

In your SSH, as root, run:

Code: Select all

tail -n 10 /var/log/php*fpm.log
If you see:

Code: Select all

[01-Mar-2023 11:32:24] WARNING: [pool] server reached max_children setting (8), consider raising it
You can increase max_children by following this tutorial: viewtopic.php?f=18&t=54
It can be bad if that number is larger than CPUThreads x 2

Warning: this log line can indicate a bot attack - see viewtopic.php?f=23&t=629

If you see:

Code: Select all

[01-Mar-2023 11:58:47] NOTICE: [pool] child 3336 exited with code 0 after 6876.122479 seconds from start
It means that script execution was too long - maybe due bug in scrpt - or high load on server - or bot attack.

For example, if we find:

Code: Select all

[04-Oct-2022 01:20:00] WARNING: [pool] child 8996, script '//home/oskar/web/' (request: "POST /dup-installer/main.installer.php") execution timed out (31.889541 sec), terminating
[04-Oct-2022 01:20:00] WARNING: [pool] child 8996 exited on signal 15 (SIGTERM) after 36.079954 seconds from start
Thst means that problem is in request_terminate_timeout.
In that case you can increase both max_execution_time and request_terminate_timeout by following this tutorial: viewtopic.php?f=18&t=54

If it is a bug or an issue in the PHP script, PHP-FPM slow log can help in debugging - viewtopic.php?f=18&t=682
Post Reply