We might have found an issue with the window size in http2 in Tomcat 9.0.45.

java.lang.IllegalStateException: Connection [483], Stream [21], Already waiting
        at 
org.apache.coyote.http2.WindowAllocationManager.waitFor(WindowAllocationManager.java:143)
        at 
org.apache.coyote.http2.WindowAllocationManager.waitForConnection(WindowAllocationManager.java:84)
        at 
org.apache.coyote.http2.Stream.waitForConnectionAllocation(Stream.java:257)
        at 
org.apache.coyote.http2.Http2UpgradeHandler.reserveWindowSize(Http2UpgradeHandler.java:903)
        at 
org.apache.coyote.http2.Stream$StreamOutputBuffer.flush(Stream.java:904)
        at 
org.apache.coyote.http2.Stream$StreamOutputBuffer.doWrite(Stream.java:823)
        at 
org.apache.coyote.http2.Http2OutputBuffer.doWrite(Http2OutputBuffer.java:59)
        at org.apache.coyote.Response.doWrite(Response.java:606)
        at 
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:340)
        at 
org.apache.catalina.connector.OutputBuffer.appendByteArray(OutputBuffer.java:753)
        at 
org.apache.catalina.connector.OutputBuffer.append(OutputBuffer.java:682)
        at 
org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:388)
        at 
org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:366)
        at 
org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:96)
        at 
org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)


This problem occurs when we are using the nghttp client to receive
data from our root page (nghttp -vnsay https://localhost). By
decreasing the initial window size to 8 kb in nghttp (flag -w 13), the
problem disappears. Another solution is to set the http2-connector
attribute maxConcurrentStreamExecution="1".


/Erik

-- 

Reply via email to