K
K
Konstantin2020-02-26 18:45:11
Nginx
Konstantin, 2020-02-26 18:45:11

nginx. HTTP2. How to change keepalive_timeout?

Hello.
nginx/1.16.1
Remove keepalive_timeout from nginx.conf.
In the host config I put

server {
  listen 443 ssl http2;
  ...
  keepalive_timeout 10s;
  keepalive_requests 3;

timeout 10sec, 3 connection
requests keepalive_requests - the maximum number of requests that can be made over one keep-alive connection. After the maximum number of requests have been made, the connection is closed.

I do 5 page updates with the "Disable cache" checkbox and see how long the connection hangs on netstat -lanW .
ESTABLISHED connection hangs for 180 seconds
in the browser Connection id one for all requests.

Can you please tell me how to change the keepalive connection time correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Somewhere Intech, 2020-02-26
@webmaster

Everything is in the dock


Syntax: http2_idle_timeout time;
Default:
http2_idle_timeout 3m;
Context: http, server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question