nginx 錯誤日志分析


502

1、查看nginx錯誤日志

tailf /data/log/nginx/error.log

2017/03/23 09:47:35 [error] 16154#0: *460 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 14.23.168.226, server: localhost, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "zjdan.com"

 原因:php-fpm.conf里面設置了php-cgi進程最大執行時間為5秒,超過則終止並斷開nginx

vim /data/server/php/etc/php-fpm.conf

request_terminate_timeout = 5

 

tailf /data/log/nginx/error.log

2017/03/28 18:21:32 [error] 28965#0: *544 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.9.206, server: weixin-develop.com, request: "GET /accept.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fcgi.sock:", host: "weixin-develop.com"

原因:php超過了最大的執行時間

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM