You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mark Thomas <ma...@apache.org> on 2020/09/14 14:42:19 UTC

Re: HTTP2 : PING and GOAWAY sent in the same millisecond

On 13/09/2020 06:19, Arshiya Shariff wrote:
> Hi All,
> 
> The KeepAliveTimeout value is configured to the default value of 20 seconds. So when the connection is idle for 20 seconds, tomcat server(Port:1090) is sending PING followed by GOAWAY within the same millisecond. The client also responds to the  PING in the same millisecond, but before that tomcat has closed the connection.
> Embedded tomcat version-9.0.33
> 
> Please find the link to the pcap for reference:
> https://drive.google.com/file/d/1y9vt9LDw0CeR894TVYSxYSdgCR69wxbQ/view?usp=sharing
> 
> 
>   1.  Is the tomcat behavior correct in sending PING and GOAWAY in the same millisecond ?

Yes. Well, sort of. Tomcat is working as intended but there is room for
improvement. There is no point sending the PING frame in this case
(connection timeout).

>   2.  Should tomcat wait for at least few seconds for PING acknowledgement/response ?

No. Tomcat is not sending the PING frame to keep the connection open.
Tomcat is sending the PING frame to measure the round-tip time (which it
needs to send GOAWAY messages correctly when the Connector is paused.

>   3.  Ripple effect will be frequent connection closures as it finally ends up in a memory leak due to connection open and close ( we know this memory leak issue is fixed in 9.0.37)

No, this PING behaviour has no effect on connection closure. The
connections will close based on the configured timeouts. If you want
longer lived connections, change the timeouts.

Note that there is no API within Servlet to request that an HTTP/2 PING
frame is sent.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org