softwaremill / softwaremill/sttp
ReadException "too many concurrent streams" - 2
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.5k
- Forks
- 338
- Avg merge
- 8h 59m
- Merged PRs (30d)
- 13
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the HttpClientFs2Backend and the linked reproduction gist, then review the JDK issue JDK-8225647 about java.net.http.HttpClient and HTTP/2 stream limits. Determine whether sttp can provide queuing or backpressure around the server's SETTINGS_MAX_CONCURRENT_STREAMS limit; done means a documented or tested workaround is identified, or the limitation is clearly scoped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, scala
- Domain
- api, backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100