question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ArmeriaRetrofitBuilder & HTTP2 - Max Number of Streams

See original GitHub issue

Hi,

I’m using the ArmeriaRetrofitBuilder to wrap an HTTP2 REST API call asynchronous:

Retrofit retrofit = new ArmeriaRetrofitBuilder()
        .baseUrl(url)
        .addConverterFactory(JacksonConverterFactory.create(mapper))
        .addCallAdapterFactory(Java8CallAdapterFactory.create())
        .build();

SomeService service = retrofit.create(SomeService.class);
Call<String> sayHello = server.sayHello();
sayHello.enqueue(this);

But I am getting this error:

io.netty.handler.codec.http2.Http2Exception$StreamException: Maximum active streams violated for this endpoint.

Am I using something wrong? If not, how do I set the max number of active streams?

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
DrMattFaulknercommented, May 18, 2018

I would like to have a way of bounding the number of connections a client makes too. I don’t know what should happen in the case of hitting the max stream AND max connections. Maybe just block the client?

0reactions
trustincommented, Dec 6, 2018

#1481 fixes this issue by making Armeria client respect MAX_CONCURRENT_STREAMS. We do not limit the number of connections yet though. We could take care of it in a separate issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

http2-max-streams - IBM
This command specifies the maximum number of outstanding concurrent HTTP/2 streams that the client can have with the HTTPS handler.
Read more >
ArmeriaRetrofitBuilder (Armeria 1.2.0 API reference) - javadoc.io
Specifies the BiFunction that creates a new non-base WebClient , which is used for sending requests to other authorities than that of base...
Read more >
How many concurrent requests should we multiplex in HTTP/2
The number of streams that client and server can initiate isn't unlimited, it's mandated by the SETTINGS_MAX_CONCURRENT_STREAMS parameter of ...
Read more >
0.91.0 release notes - ARMERIA.dev
You can specify the maximum number of event loops to handle connections. ... HttpClient myClient = ...; ArmeriaRetrofitBuilder builder = new ...
Read more >
Improve throughput and concurrency with HTTP/2 - Vespa Blog
HTTP/2 with 256 concurrent streams gave a throughput of 115 000 requests per seconds compared to 6 500 for HTTP/1.1. Increasing the number...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found