Skip to content

No way to set timeout for the requests when using Jetty reactive httpclient  #25493

@sathishkp85

Description

@sathishkp85

We are using Jetty reactive http client as the httpclient in webClient. To do this we create ClientConnector object using JettyClientHttpConnector.java (from spring-web). Now the JettyClientHttpConnector.java doesn't have a way to set timeout for the jetty's HttpRequest. If timeout is not set then the request remains in the jettyclient queue until a response is received from server. This is causing problems during load/stress tests as jettyclient queue fills up to the maximum (when the server is too slow). Once queue is filled up "Max requests queued per destination" error is thrown after this no new request can be sent. Now to stop the queue fill up we need a way to set timeout to request, jetty has a way to set timeout for the requests, it's there in the HttpRequest.java class of jetty code. The only problem is JettyClientHttpConnector.java (from spring-web) doesn't have a way to set this timeout to the HttpRequest object created in connect() method.

Jetty HttpRequest.java timeout configuration -> https://www.eclipse.org/jetty/javadoc/current/org/eclipse/jetty/client/HttpRequest.html#timeout(long,java.util.concurrent.TimeUnit)

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions