帮忙分析下502错误的原因,附日志
Apr 28 17:39:01.864027 fpm_got_signal(), line 56: received SIGTERMApr 28 17:39:01.984021 fpm_pctl(), line 256: switching to 'terminating' state
Apr 28 17:39:01.984102 fpm_pctl_kill_all(), line 172: sending signal 15 SIGTERM to child 18905 (pool default)
Apr 28 17:39:01.984131 fpm_pctl_kill_all(), line 172: sending signal 15 SIGTERM to child 18904 (pool default)
Apr 28 17:39:01.984156 fpm_pctl_kill_all(), line 172: sending signal 15 SIGTERM to child 18903 (pool default)
.......
Apr 28 17:39:01.985777 fpm_pctl_kill_all(), line 172: sending signal 15 SIGTERM to child 18842 (pool default)
Apr 28 17:39:01.985800 fpm_pctl_kill_all(), line 181: 64 children are still alive
Apr 28 17:39:01.988445 fpm_got_signal(), line 48: received SIGCHLD
Apr 28 17:39:01.988613 fpm_children_bury(), line 215: child 18905 (pool default) exited on signal 15 SIGTERM after 20937.394440 seconds from start
Apr 28 17:39:01.989644 fpm_got_signal(), line 48: received SIGCHLD
Apr 28 17:39:01.989749 fpm_children_bury(), line 215: child 18903 (pool default) exited on signal 15 SIGTERM after 20937.399607 seconds from start
........
Apr 28 17:39:02.068023 fpm_got_signal(), line 48: received SIGCHLD
Apr 28 17:39:02.068071 fpm_children_bury(), line 215: child 18875 (pool default) exited on signal 15 SIGTERM after 20937.538425 seconds from start
Apr 28 17:39:02.068854 fpm_got_signal(), line 48: received SIGCHLD
Apr 28 17:39:02.068921 fpm_children_bury(), line 215: child 18879 (pool default) exited on signal 15 SIGTERM after 20937.529862 seconds from start
Apr 28 17:39:02.069426 fpm_got_signal(), line 48: received SIGCHLD
Apr 28 17:39:02.069520 fpm_children_bury(), line 215: child 18878 (pool default) exited on signal 15 SIGTERM after 20937.533416 seconds from start
Apr 28 17:39:02.073140 fpm_got_signal(), line 48: received SIGCHLD
Apr 28 17:39:02.073232 fpm_children_bury(), line 215: child 18877 (pool default) exited on signal 15 SIGTERM after 20937.537997 seconds from start
Apr 28 17:39:02.073259 fpm_pctl_exit(), line 81: exiting, bye-bye!
Apr 28 17:39:03.437616 fpm_unix_init_main(), line 284: getrlimit(nofile): max:1024, cur:1024
Apr 28 17:39:03.438255 fpm_event_init_main(), line 88: libevent: using epoll
Apr 28 17:39:03.438368 fpm_init(), line 52: fpm is running, pid 27029
Apr 28 17:39:03.441606 fpm_children_make(), line 352: child 27030 (pool default) started
Apr 28 17:39:03.444864 fpm_children_make(), line 352: child 27031 (pool default) started
Apr 28 17:39:03.448468 fpm_children_make(), line 352: child 27032 (pool default) started
Apr 28 17:39:03.451085 fpm_children_make(), line 352: child 27033 (pool default) started
Apr 28 17:39:03.452130 fpm_children_make(), line 352: child 27034 (pool default) started
Apr 28 17:39:03.454979 fpm_children_make(), line 352: child 27035 (pool default) started
Apr 28 17:39:03.457100 fpm_children_make(), line 352: child 27036 (pool default) started
........
Apr 28 17:39:03.585812 fpm_children_make(), line 352: child 27091 (pool default) started
Apr 28 17:39:03.589002 fpm_children_make(), line 352: child 27092 (pool default) started
Apr 28 17:39:03.592069 fpm_children_make(), line 352: child 27093 (pool default) started
Apr 28 17:39:03.592171 fpm_event_loop(), line 107: libevent: entering main loop
Apr 28 17:40:01.865633 fpm_got_signal(), line 56: received SIGTERM
Apr 28 17:40:01.865719 fpm_pctl(), line 256: switching to 'terminating' state
Apr 28 17:40:01.865771 fpm_pctl_kill_all(), line 172: sending signal 15 SIGTERM to child 27093 (pool default)
Apr 28 17:40:01.865799 fpm_pctl_kill_all(), line 172: sending signal 15 SIGTERM to child 27092 (pool default)
Apr 28 17:40:01.865823 fpm_pctl_kill_all(), line 172: sending signal 15 SIGTERM to child 27091 (pool default)
;;;;;;;;;;;;;;;;;;;;;;;;
/usr/local/php/logs/php-fpm.log
中间打省略号是因为相同的信息出现很多次,所以没粘帖那么多过来。
/home/wwwlogs/nginx_error.log
2012/04/28 17:39:02 1986#0: *1347213 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 101.226.33.222, server: www.trjie.com, request: "GET /do.php?ac=sendmail&rand=1335605526 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.trjie.com"2012/04/28 17:39:02 1987#0: *1346931 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 114.218.207.118, server: bbs.tnbz.com, request: "GET /thread-78387-1-1.html HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "bbs.tnbz.com", referrer: "http://bbs.tnbz.com/"
2012/04/28 17:39:02 1987#0: *1347217 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 123.126.50.69, server: ucenter.tnbz.com, request: "GET /avatar.php?uid=14537&size=middle HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "ucenter.tnbz.com", referrer: "http://pic.sogou.com"
2012/04/28 17:39:02 1986#0: *1347218 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 61.135.169.13, server: bbs.tnbz.com, request: "GET /thread-267788-1-1.html HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "bbs.tnbz.com"
2012/04/28 17:39:02 1987#0: *1347222 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 120.197.87.219, server: bbs.tnbz.com, request: "GET /wap/index.php?action=thread&do=reply&tid=37093&pid=281315&sid=gT6oiZ HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "bbs.tnbz.com"
2012/04/28 17:39:02 1986#0: *1344992 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 203.208.60.227, server: bbs.tnbz.com, request: "GET /viewthread.php?tid=269156 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "bbs.tnbz.com"
2012/04/28 17:39:02 1987#0: *1347221 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 116.22.180.46, server: bbs.tnbz.com, request: "GET /pm.php?checknewpm=0.8605579405953128&inajax=1&ajaxtarget=myprompt_check HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "bbs.tnbz.com", referrer: "http://bbs.tnbz.com/thread-241212-17-1.html"
2012/04/28 17:39:02 1987#0: *1347226 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 120.197.87.238, server: bbs.tnbz.com, request: "GET /wap/index.php?action=thread&do=reply&tid=268742&pid=2542973&sid=oz9qgO HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "bbs.tnbz.com" ./lnmp restart后就可以了。 https://bbs.vpser.net/thread-1654-1-1.html
安装这个调整试试
或加上个502 检测脚本,自动重启,论坛里自己有https://bbs.vpser.net/thread-1913-1-1.html 谢谢军哥。
“502 检测脚本,自动重启”一直加的有这个脚本。 netstat -anpo | grep "php-cgi" | wc -l
90
我的max-children 设置的是64 ,我现在改成 100试试。
页:
[1]