Skip to content

ReadException "too many concurrent streams" - 2 #2788

Description

@dpevunov-cp

When using sttp's HttpClientFs2Backend (which uses JDK's java.net.http.HttpClient) with HTTP/2, high concurrent load causes immediate failures with java.io.IOException: too many concurrent streams instead of queuing requests

JDK HttpClient creates one HTTP/2 connection per host and fails immediately when concurrent requests exceed the server's SETTINGS_MAX_CONCURRENT_STREAMS limit (typically 100). This is a known unresolved JDK bug: https://bugs.openjdk.org/browse/JDK-8225647.

I would expect this setting to work like some backpressure mechanism but not just failing requests(at least not right away and waiting till timeout comes)

Is there any suggestion or workaround for this to be fixed on sttp lvl?

Here is a gist for reproducing the issue

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions