Hi
  We noticed that the Http2 idle flag 
(https://github.com/nginx/nginx/blob/master/src/http/v2/ngx_http_v2.h#L126) is 
initialized to `1` 
(https://github.com/nginx/nginx/blob/master/src/http/v2/ngx_http_v2.c#L335) but 
not reset by  the http2 state machine. It also looks like Nginx does not set 
keep alive timer for http2 as the keep alive setter code path is short 
circuited for http2 
(https://github.com/nginx/nginx/blob/master/src/http/ngx_http_request.c#L2706). 

  During worker shutdown when idle connections are reaped 
(https://github.com/nginx/nginx/blob/master/src/core/ngx_connection.c#L1363), 
due to the fact that http2 connections are always `idle`,  ongoing streams end 
up prematurely getting closed on the read side(sends GOAWAY frame). 

It looks like the `idle` connection implementation as it is today only answers 
the question - “Can nginx prematurely close the streams when shutting down?”   
Is the above behavior intentional? 

It appears from the name of the flag (`idle`) that the intent is to reflect the 
dynamic state of the connection (are reads and writes happening for the 
connection for any of the streams) but the implementation does not reflect that.

What is the intended behavior ? We would have liked a `idle` flag with its 
corresponding timeout configuration that lets us control the behavior during 
shutdown (and other flows).


Thanks in advance

Jojy
_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-le...@nginx.org

Reply via email to