Hi team, Since Tomcat 9.0.72 (also tested in 9.0.73) seems there is an issue related to HTTP2 Protocol. We are using default values for HTTP2 protocol <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol"/> But since 9.0.72 version we receive randomly ERR_HTTP2_SERVER_REFUSED_STREAM error messages for random static files (images, js, etc...) org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch Connection [0], Stream [473] Closed due to error Note: further occurrences of HTTP/2 stream errors will be logged at DEBUG level. org.apache.coyote.http2.StreamException: The client attempted to use more than [100] active streams at org.apache.coyote.http2.Http2UpgradeHandler.headersEnd(Http2UpgradeHandler.java:1723) at org.apache.coyote.http2.Http2Parser.onHeadersComplete(Http2Parser.java:622) at org.apache.coyote.http2.Http2Parser.readHeadersFrame(Http2Parser.java:284) at org.apache.coyote.http2.Http2Parser.readFrame(Http2Parser.java:110) at org.apache.coyote.http2.Http2Parser.readFrame(Http2Parser.java:82) at org.apache.coyote.http2.Http2UpgradeHandler.upgradeDispatch(Http2UpgradeHandler.java:345) at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:60) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:57) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2156) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:829) Error is quite clear. Basically we are using more streams that available. But the problem is that we are not loading 100 files in the requests, but 20 or 30. Based in docs we have increased the maxConcurrentStreams up to 400 with the same result. So seems that streams are not being closed correctly. As told, this issue only appeared in 9.0.72 and 9.0.73, but on on 9.0.71 and below, so seems some issue caused by some change in version 9.0.72 It would be great if you wan take a look. Thank you!
Fortunately there are only nine changes to the HTTP/2 code between 9.0.71 and 9.0.72. Seven of those changes are non-functional changes which leaves two. It is the fix for bug 66442 that is causing the issue. Responses without a body are not decrementing the active stream count when complete. I'm investigating a fix now.
Fixed in: - 11.0.x for 11.0.0-M5 onwards - 10.1.x for 10.1.8 onwards - 9.0.x for 9.0.74 onwards - 8.5.x for 8.5.88 onwards
Thank you very much Mark