• 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

Resolved Is anyone having trouble with keep alive : connexion closed with nginx

AmaZili Communication

Basic Pleskian
Hi,

On one of our servers we have Plesk 12.5 running on Centos 7.2.
Accounts are running php-fpm thru nginx. HTTP/2 is enabled.

Our custom config directives includes :

Code:
keepalive_timeout 65;
keepalive_requests 100000;

but checking the websites with :

https://headers.cloxy.net/

We get :

Code:
    HTTP/1.1 200 OK
    Server: nginx
    Date: Sun, 02 Oct 2016 12:00:16 GMT
    Content-Type: text/html; charset=UTF-8
    Connection: close
    Vary: Accept-Encoding
    X-Powered-By: PHP/7.0.11
    Set-Cookie: PHPSESSID=5naqvp7gmdtbi94gs602433ko1; expires=Sun, 09-Oct-2016 12:00:16 GMT; Max-Age=604800; path=/; HttpOnly
    Cache-Control: max-age=604800
    Expires: Sun, 09 Oct 2016 12:00:16 GMT
    Last-Modified: Sun, 02 Oct 2016 12:00:16 GMT
    Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
    Pragma: public
    Cache-Control: public, must-revalidate, proxy-revalidate
    X-UA-Compatible: IE=edge,chrome=1

which says connection closed, that is also verified using :

https://www.webpagetest.org/
https://www.webpagetest.org/
Which says :

Code:
F
Keep-alive Enabled

Any idea about enabling properly keepalive connexions ?

Thanks for your guess.
 
Hi AmaZili Communication,

you seem to misunderstand the "keep-alive" - settings, because you seem to think, that client-to-server connections will stay opened untill the maximum defined setting is reached. Nginx needs to close connections from time to time, even if you configure nginx to allow infinite keep-alive-timeouts and a huge amount of acceptable requests per connection, to return results and as well errors and success messages. You tested for example a website and seem to be surprised, that the result is a shown "connection closed" result, but you seem to miss the fact, that your request to test the website has been FINISHED, when you see the individual test - result - page. ;)
 
Back
Top