VPS侦探论坛

 找回密码
 注册
查看: 7155|回复: 5

帮忙分析下502错误的原因,附日志

[复制链接]
发表于 2012-4-28 19:12:32 | 显示全部楼层 |阅读模式

Apr 28 17:39:01.864027 [NOTICE] fpm_got_signal(), line 56: received SIGTERM
Apr 28 17:39:01.984021 [NOTICE] fpm_pctl(), line 256: switching to 'terminating' state
Apr 28 17:39:01.984102 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 15 SIGTERM to child 18905 (pool default)
Apr 28 17:39:01.984131 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 15 SIGTERM to child 18904 (pool default)
Apr 28 17:39:01.984156 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 15 SIGTERM to child 18903 (pool default)
.......
Apr 28 17:39:01.985777 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 15 SIGTERM to child 18842 (pool default)
Apr 28 17:39:01.985800 [NOTICE] fpm_pctl_kill_all(), line 181: 64 children are still alive
Apr 28 17:39:01.988445 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
Apr 28 17:39:01.988613 [WARNING] 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 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
Apr 28 17:39:01.989749 [WARNING] 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 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
Apr 28 17:39:02.068071 [WARNING] 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 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
Apr 28 17:39:02.068921 [WARNING] 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 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
Apr 28 17:39:02.069520 [WARNING] 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 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
Apr 28 17:39:02.073232 [WARNING] 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 [NOTICE] fpm_pctl_exit(), line 81: exiting, bye-bye!
Apr 28 17:39:03.437616 [NOTICE] fpm_unix_init_main(), line 284: getrlimit(nofile): max:1024, cur:1024
Apr 28 17:39:03.438255 [NOTICE] fpm_event_init_main(), line 88: libevent: using epoll
Apr 28 17:39:03.438368 [NOTICE] fpm_init(), line 52: fpm is running, pid 27029
Apr 28 17:39:03.441606 [NOTICE] fpm_children_make(), line 352: child 27030 (pool default) started
Apr 28 17:39:03.444864 [NOTICE] fpm_children_make(), line 352: child 27031 (pool default) started
Apr 28 17:39:03.448468 [NOTICE] fpm_children_make(), line 352: child 27032 (pool default) started
Apr 28 17:39:03.451085 [NOTICE] fpm_children_make(), line 352: child 27033 (pool default) started
Apr 28 17:39:03.452130 [NOTICE] fpm_children_make(), line 352: child 27034 (pool default) started
Apr 28 17:39:03.454979 [NOTICE] fpm_children_make(), line 352: child 27035 (pool default) started
Apr 28 17:39:03.457100 [NOTICE] fpm_children_make(), line 352: child 27036 (pool default) started

........
Apr 28 17:39:03.585812 [NOTICE] fpm_children_make(), line 352: child 27091 (pool default) started
Apr 28 17:39:03.589002 [NOTICE] fpm_children_make(), line 352: child 27092 (pool default) started
Apr 28 17:39:03.592069 [NOTICE] fpm_children_make(), line 352: child 27093 (pool default) started
Apr 28 17:39:03.592171 [NOTICE] fpm_event_loop(), line 107: libevent: entering main loop
Apr 28 17:40:01.865633 [NOTICE] fpm_got_signal(), line 56: received SIGTERM
Apr 28 17:40:01.865719 [NOTICE] fpm_pctl(), line 256: switching to 'terminating' state
Apr 28 17:40:01.865771 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 15 SIGTERM to child 27093 (pool default)
Apr 28 17:40:01.865799 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 15 SIGTERM to child 27092 (pool default)
Apr 28 17:40:01.865823 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 15 SIGTERM to child 27091 (pool default)

;;;;;;;;;;;;;;;;;;;;;;;;
/usr/local/php/logs/php-fpm.log

中间打省略号是因为相同的信息出现很多次,所以没粘帖那么多过来。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-4-28 19:20:51 | 显示全部楼层

/home/wwwlogs/nginx_error.log



2012/04/28 17:39:02 [crit] 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 [crit] 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 [crit] 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 [crit] 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 [crit] 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 [crit] 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 [crit] 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 [crit] 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"
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-4-28 19:24:16 | 显示全部楼层

./lnmp restart  后就可以了。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-4-28 19:39:03 | 显示全部楼层



https://bbs.vpser.net/thread-1654-1-1.html
安装这个调整试试

或加上个502 检测脚本,自动重启,论坛里自己有https://bbs.vpser.net/thread-1913-1-1.html
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-4-28 20:47:21 | 显示全部楼层

谢谢军哥。

“502 检测脚本,自动重启”  一直加的有这个脚本。

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2012-4-28 20:48:27 | 显示全部楼层

netstat -anpo | grep "php-cgi" | wc -l  
90

我的max-children 设置的是64 ,我现在改成 100试试。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-17 07:32 , Processed in 0.027387 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表