The service is nginx + PHP FPM configuration
After running for a period of time, it often appears as follows:
WARNING: [pool www] server reached pm.max_children setting (50), consider raising it
The maximum number of child processes is reached and the number of child processes needs to be provided
503/502 is generally due to server maintenance or overload. Recently, the server has not been maintained. Querying the monitoring records, we found that the load is not very high. We speculated whether the server has restrictions on some configurations of the project. We checked the nginx and PHP logs and found that:
Find the php-fpm.conf file and find the PHP log error
[15-Nov-2017 15:23:51] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
[15-Nov-2017 17:10:53] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
[15-Nov-2017 17:12:56] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
[15-Nov-2017 18:29:28] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
[16-Nov-2017 10:25:17] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
the warning appears frequently, and the number of child processes reaches the maximum. Query the PHP FPM configuration file www.conf It is found that PM. Max_ Children use the default configuration, obviously because the setting value is too small
Problem solving:
Modification
pm.start_servers = 10 //Number of php-fpm start processes pm.min_spare_servers = 10 //minimum number of idle processes for php-fpm pm.max_spare_servers = 24 //maximum number of idle processes for php-fpm pm.max_requests = 500 // restart time for all child processes
Similar Posts:
- Nginx Error: nginx: [emerg] “server” directive is not allowed here in
- [Solved] Nginx Log Error: open() “/opt/Nginx/nginx/nginx.pid” failed (2: No such file or directory)
- ÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐ
- Waiting for ACK request when starting easygbs: call [809709832] cseq [127 invite] timeout [10s]
- Nginx Error: Nginx 403 error:directory index of “xxx“ is forbidden
- su: cannot set user id: Resource temporarily unavailable
- Nginx Error: too many open files [How to Solve]
- [Solved] Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid
- nginx Server Start Error: nginx: [emerg] open() “/var/run/nginx/nginx.pid” failed (Linux Restart)
- [Solved] nginx Error: directory index of “/home/www/hexo/” is forbidden