Once opened the site, found 502, the first reaction must be PHP-FPM did not start, try to start or 502.
1. First query Nginx log found the following connection PHP failure:
2016/07/29 15:56:04 [error] 23760#0: *186 connect() failed (111: Connection refused) while connecting to upstream, client:11.10.8.252.18, server: xuliangwei.com request: "GET /index.php?route=rest/crontab HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xuliangwei.com"
2. Inquiries through DMESG to the following:
[6819070.815161]init: php5-fpm main process ended, respawning[6819070.861943]init: php5-fpm main process (25401) terminated with status 78[6819070.861955]init: php5-fpm main process ended, respawning[6819070.910152]init: php5-fpm main process (25409) terminated with status 78
3. Checking the configuration file via PHP-FPM
[email protected]:/etc/php5/fpm/pool.d# /usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf[29-Jul-2016 15:57:14] ERROR: [/etc/php5/fpm/php-fpm.conf:27] unknown entry ‘catch_workers_output‘[29-Jul-2016 15:57:14] ERROR: failed to load configuration file ‘/etc/php5/fpm/php-fpm.conf‘[29-Jul-2016 15:57:14] ERROR: FPM initialization failed
4. Note Catch_workers_output
[email protected]:/etc/php5/fpm/pool.d# vim /etc/php5/fpm/php-fpm.conf +27[email protected]:/etc/php5/fpm/pool.d# service php5-fpm startphp5-fpm start/running, process 25545
5. After successful startup, the website has been visited normally
[email protected]:/etc/php5/fpm/pool.d# ps aux|grep phproot 25545 0.6 0.1 342748 18812 ? Ss 15:58 0:00 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)ubuntu 25548 0.0 0.0 342748 5644 ? S 15:58 0:00 php-fpm: pool wwwubuntu 25549 0.0 0.0 342748 5644 ? S 15:58 0:00 php-fpm: pool wwwubuntu 25550 0.0 0.0 342748 5644 ? S 15:58 0:00 php-fpm: pool wwwubuntu 25551 0.0 0.0 342748 5644 ? S 15:58 0:00 php-fpm: pool wwwubuntu 25552 0.0 0.0 342748 5644 ? S 15:58 0:00 php-fpm: pool www
6. The solution offered by Google is as follows 2 types of solutions:
1.PHP-FPM not running
Execute the following command to see if PHP-FPM is started, and if not, start your php-fpm.
netstat -ant | grep 9000
The 2.PHP-FPM queue is full.
php-fpm.conf configuration file pm.max_children
Modify a little bit, restart PHP-FPM and observe the log condition
php502 Fault Handling