connect() failed (111: Connection refused) while connecting to upstream, cli

Posted cxscode

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了connect() failed (111: Connection refused) while connecting to upstream, cli相关的知识,希望对你有一定的参考价值。

php-fpm没有运行

执行如下命令查看是否启动了php-fpm,如果没有则启动你的php-fpm即可

netstat -ant | grep 9000

 没有运行为空,有运行显示

tcp        0      0 127.0.0.1:9000              0.0.0.0:*                   LISTEN

启动方法

sudo /usr/local/php/sbin/php-fpm //sudo 启动

/usr/local/php/sbin/php-fpm -R //以root身份启动

 

php-fpm队列满了

php-fpm.conf配置文件pm.max_children修改大一点,重启php-fpm并观察日志情况

在/usr/local/php/etc/php-fpm.conf 可能找不到pm.max_children配置,在文件结尾看到有include=/usr/local/php/etc/php-fpm.d/*.conf,打开对应地址文件

vi /usr/local/php/etc/php-fpm.d/www.conf

键入/,进入查询模式,输入pm.max_children回车,将max_children值改为128

最后记得重启下php-fpm和nginx


以上是关于connect() failed (111: Connection refused) while connecting to upstream, cli的主要内容,如果未能解决你的问题,请参考以下文章

nginx和php-fpm配置 错误connect() failed (111: Connection refused) while connecting to upstream connect()

connect() failed (111: Connection refused) while connecting to upstream, cli

Get value from agent failed: cannot connect to [[127.0.0.1]:10050]: [111] Connection refused

nginx 报错 connect() failed (111: Connection refused) while connecting to upstream

nginx:连接到上游时连接()失败(111:连接被拒绝)

遇到问题--scala-gradle--Connect to jcenter.bintray.com:443 [jcenter.bintray.com/34.95.74.180] failed: co