Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] jetty 11 blocking http client timeout handling broken

Hi there,
after upgrading to jetty 11, we noted that our qtp threadpool started to grow over time. We found that we had an invocation of blocking org.eclipse.jetty.client.HttpRequest#send in one of our handlers.

The code has been lately changed to not use a timed get and the existing timeout handling does not seem to work as expected.

Our code was basically this:

var response = client.newRequest(url)
  .method(method)
  .timeout(TIMEOUT, TimeUnit.SECONDS)
  .send();

Stacks of the same thread at different times proof that the timeout was somehow not respected. See https://gist.github.com/mpfau/dc7adc7074108ff085e44634dc0cf86f.

In the end, we had around 200 Threads that were all stuck at the same place.

We switched to async #send now. I guess this will solve the problem in our case.
Best,
Matthias


Back to the top