Home >Backend Development >PHP Tutorial >Encountered a problem----connect() failed (111: Connection refused) while connecting to upstream solution
When we start nginx, we may encounter the problem of connect() failed (111: Connection refused) while connecting to upstream.
php-fpm is not installed
This is the case with the newly purchased Alibaba Cloud server. There is nginx, but php-fpm is not installed
In this case, please refer to
centos to install php php-fpm and configure nginx
php-fpm is not running
netstat -ant | grep 9000
sudo /usr/local/php/sbin/php-fpm
php-fpm queue is full
php-fpm.conf configuration filepm.max_children should be changed to a larger size, restart php-fpm and observe Log status
The above introduces the solution to the problem----connect() failed (111: Connection refused) while connecting to upstream, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.