Hi, 

I debugged this further and the problem seems to be because of the below code 
in Http2UpgradeHandler class:

    private void closeIdleStreams(int newMaxActiveRemoteStreamId) throws 
Http2Exception {
        for (int i = maxActiveRemoteStreamId + 2; i < 
newMaxActiveRemoteStreamId; i += 2) {
            Stream stream = getStream(i, false);
            if (stream != null) {
                stream.closeIfIdle();
            }
        }
        maxActiveRemoteStreamId = newMaxActiveRemoteStreamId;
    }

When we take 1st StreamId as 2147483641, the above loop takes around 4~5 
seconds to execute and hence, the response is delayed.

Regards,
Prateek Kohli

-----Original Message-----
From: Manuel Dominguez Sarmiento <m...@renxo.com> 
Sent: Thursday, May 21, 2020 3:34 PM
To: Tomcat Users List <users@tomcat.apache.org>; Prateek Kohli 
<prateek.ko...@ericsson.com.INVALID>
Subject: Re: Http2 tomact server taking time in responding when 1st StreamId is 
a large integer value like 2147483641

I must say that we're also seeing weird, seemingly random response delays from 
Tomcat on HTTP/2 We haven't looked into it at such a low level though. We're 
currently on
9.0.35 but we've been seeing this on previous versions as well.

*Manuel Dominguez Sarmiento*

On 21/05/2020 05:32, Prateek Kohli wrote:
>
> Hello,
>
> Tomcat version : 9.0.29
>
> We are running a Tomcat Http2 Server and a Jetty http2 client.
>
> When we send 1^st request from Jetty client to tomcat server with 
> streamId number as 1, tomcat sends the WINDOW_UPDATE header and the 
> response in 1~2 milliseconds.
>
> Packet number 164 is the response in the below tcpdump.
>
> But when we send the 1st request from jetty client to tomcat server 
> with streamId as 2147483641, the 1^st response from tomcat comes after 
> almost 5 seconds
>
> And the response for subsequent requests comes within 1~2 milliseconds.
>
> In the below tcpdump it can be seen that the response packet number
> 167 comes after almost 5 seconds from the tomcat server.
>
> Would you please be able to explain why the response from tomcat 
> server is getting delayed when the 1^st StreamId number is a large 
> integer i.e. 2147483641.
>
> Regards,
>
> Prateek Kohli
>


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

Reply via email to