connect() failed (111: Connection refused) while connecting to upstream解决

凉白开 Nginx2123,3368字数 287阅读0分57秒阅读模式

有时候nginx运行很正常,但是会发现错误日志中依旧有报错connect() failed (111: Connection refused) while connecting to upstream.

一般情况下我们的upstream都是fastcgi://127.0.0.1:9000. 造成这个问题的原因大致有两个文章源自运维生存时间-https://www.ttlsa.com/nginx/connect-failed-111-connection-refused-while-connecting-to-upstream/

 php-fpm没有运行

执行如下命令查看是否启动了php-fpm,如果没有则启动你的php-fpm即可文章源自运维生存时间-https://www.ttlsa.com/nginx/connect-failed-111-connection-refused-while-connecting-to-upstream/

netstat -ant | grep 9000

 文章源自运维生存时间-https://www.ttlsa.com/nginx/connect-failed-111-connection-refused-while-connecting-to-upstream/

php-fpm队列满了

php-fpm.conf配置文件pm.max_children修改大一点,重启php-fpm并观察日志情况文章源自运维生存时间-https://www.ttlsa.com/nginx/connect-failed-111-connection-refused-while-connecting-to-upstream/

 文章源自运维生存时间-https://www.ttlsa.com/nginx/connect-failed-111-connection-refused-while-connecting-to-upstream/ 文章源自运维生存时间-https://www.ttlsa.com/nginx/connect-failed-111-connection-refused-while-connecting-to-upstream/

weinxin
我的微信
微信公众号
扫一扫关注运维生存时间公众号,获取最新技术文章~
凉白开
  • 本文由 发表于 26/05/2014 01:00:15
  • 转载请务必保留本文链接:https://www.ttlsa.com/nginx/connect-failed-111-connection-refused-while-connecting-to-upstream/
评论  2  访客  2
    • Aceslup
      Aceslup 9

      这个问题应该还算少的。

      • 牧童Damian
        牧童Damian 9

        mark
        php-fpm

      评论已关闭!