HTTP2 : PING and GOAWAY sent in the same millisecond

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

HTTP2 : PING and GOAWAY sent in the same millisecond

Arshiya Shariff
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 ?
  2.  Should tomcat wait for at least few seconds for PING acknowledgement/response ?
  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)

Thanks and Regards
Arshiya Shariff
Reply | Threaded
Open this post in threaded view
|

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

markt
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: [hidden email]
For additional commands, e-mail: [hidden email]