• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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