• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Nginx connections refused

Zicane

Basic Pleskian
Hi, I have a huge problem.
Randomly, the website that I have on a Centos Server (with Plesk) go to unreachable, like 1 time daily.
While the Plesk panel and the server keep being reachable.
The only thing I can do for reach the website again is restart the entire server.
I have checked systems logs (messages) and there is nothing but only an errore of php-fpm that tells me "Php-fpm7.0 starts to fail", but I use Php 7.1.
I tried to see nginx logs and there is this:
" [error] 4465#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client:myserverip, server: , request: "GET / HTTP/1.1", upstream: "http://myserverip:7080/", host: "myserverip""


Where I can read other logs? Because in these logs, in the period of time of "unreachablity" there are no errors that helps me to find the problem.
Someone had the same problem?
Please help.
 
PHP 7.0 won't start if there are not websites using it, because in this case configuration files are missing for PHP 7.0. So if you are using PHP 7.1, it is correct that PHP 7.0 does not start. So this is a different problem from what your post is about.

There can be many reasons for the "connection refused while connecting to upstream" message. The message means that Nginx cannot receive an answer from Apache. The places to further look for the cause are
- Apache web server (Is it up and running at that time?)
- PHP-FPM service (Is it up and running at that time? Does it have enough resources, e.g. can it create further children or create new instances? How many instances is it using at the time of the error?)
- The website itself (Can you open a phpinfo(); page, so might the issue be caused by an infinite redirect? Does your script depend on input from other scripts that don't respond, e.g. external resources? Etc., endless possibilities there ...)
 
That's an interesting approach to "solve" it (turning Apache off completely ...). Yes, sure that will work, but then you cannot use Apache and the .htaccess file capability any longer, because all web requests will only be processed by Nginx.
 
Back
Top