Closed
Description
java.lang.IllegalStateException: Max local stream count 2 exceeded
at org.eclipse.jetty.http2.HTTP2Session.createLocalStream(HTTP2Session.java:696)
at org.eclipse.jetty.http2.HTTP2Session.newStream(HTTP2Session.java:491)
at org.eclipse.jetty.http2.client.http.HttpSenderOverHTTP2.sendHeaders(HttpSenderOverHTTP2.java:93)
at org.eclipse.jetty.client.HttpSender.send(HttpSender.java:212)
at org.eclipse.jetty.http2.client.http.HttpChannelOverHTTP2.send(HttpChannelOverHTTP2.java:95)
at org.eclipse.jetty.client.HttpChannel.send(HttpChannel.java:128)
at org.eclipse.jetty.client.HttpConnection.send(HttpConnection.java:201)
at org.eclipse.jetty.http2.client.http.HttpConnectionOverHTTP2.send(HttpConnectionOverHTTP2.java:72)
at org.eclipse.jetty.http2.client.http.HttpDestinationOverHTTP2.send(HttpDestinationOverHTTP2.java:38)
at org.eclipse.jetty.client.HttpDestination.process(HttpDestination.java:347)
at org.eclipse.jetty.client.HttpDestination.process(HttpDestination.java:305)
at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:295)
at org.eclipse.jetty.client.HttpDestination.release(HttpDestination.java:400)
at org.eclipse.jetty.http2.client.http.HttpConnectionOverHTTP2.release(HttpConnectionOverHTTP2.java:99)
at org.eclipse.jetty.http2.client.http.HttpChannelOverHTTP2.release(HttpChannelOverHTTP2.java:101)
at org.eclipse.jetty.http2.client.http.HttpChannelOverHTTP2.exchangeTerminated(HttpChannelOverHTTP2.java:121)
at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:465)
at org.eclipse.jetty.client.HttpReceiver.abort(HttpReceiver.java:552)
at org.eclipse.jetty.client.HttpChannel.abortResponse(HttpChannel.java:156)
at org.eclipse.jetty.client.HttpChannel.abort(HttpChannel.java:149)
at org.eclipse.jetty.http2.client.http.HttpChannelOverHTTP2.abort(HttpChannelOverHTTP2.java:108)
at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:257)
at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java:141)
at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:767)
at org.eclipse.jetty.client.TimeoutCompleteListener.onTimeoutExpired(TimeoutCompleteListener.java:52)
at org.eclipse.jetty.io.CyclicTimeout$Wakeup.run(CyclicTimeout.java:271)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:299)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.base/java.lang.Thread.run(Thread.java:844)
Activity
sbordet commentedon Aug 13, 2018
The issue is that
HttpChannelOverHTTP2.abort()
first callssuper
and then resets the stream.Unfortunately, calling
super
returns the connection to the pool, which will then be available for another stream before the aborted stream is closed, which would decrease the local stream count.Fixes #2796 - Max local stream count exceeded when request fails.
Merge pull request #2797 from eclipse/jetty-9.4.x-2796-max_concurrent…
Issue #2796 - Max local stream count exceeded when request fails.
Issue #2796 - Max local stream count exceeded when request fails.
Issue #2796 - Max local stream count exceeded when request fails.
Issue #2796 - Max local stream count exceeded when request fails.
Merge pull request #2965 from eclipse/jetty-9.4.x-2796-http2_max_conc…
[-]Max local stream count exceeded when request fails[/-][+]HTTP/2 max local stream count exceeded when request fails[/+]Issue #5147 - HTTP2 RoundRobinConnectionPool with maxUsage