Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty http2 client request hangs indefinitely


On Wed, Aug 21, 2019 at 11:42 AM Santhosh Kumar <santhosh89j@xxxxxxxxx> wrote:
> We are trying to implement a http2 jetty client which makes a multiplexed connection with our remote servers. Our program is as follows,


The code is correct, apart perhaps for this:

> request.timeout(420, TimeUnit.SECONDS);

This is typically way too large. Is there any reason you want this
large total timeout?

> We use synchronous calls and conscrypt(security provider) to support ALPN in jdk8 and use TLSv1.3. we are able to make http2 requests successfully to our remote locations. but we face a problem where most of the threads hangs indefinitely until we restart our servers.

You have to explain this a bit better.
>From where are you using the client? From a remote client, or from
within a web application deployed in Tomcat?
With "restart our servers" you mean restart the remote servers that
the client calls?
A schematic diagram of client, load balancer, servers, etc will be
great to understand how is the system.

> I checked jetty docs for possible timeout and we have configured all timeout but still we don't know why threads hung indefinitely. We have thread dump for the same,

The thread dump does not show much.
You will have better luck registering HttpClient instances in JMX and
the performing a HttpClient dump via JMX.
This is how you do it:
Once you are blocking again, you connect with a JMX console, find the
HttpClient MBean, and invoke its dump() operation to get the
HttpClient internal state.
Then attach it here for analysis.

Do you have the same problem if you don't use OpenSSL, but the
standard JDK TLS implementation?

Simone Bordet
Developer advice, training, services and support
from the Jetty & CometD experts.

Back to the top