-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebSocketClient connect / upgrade timeout not configurable #5018
Comments
@michaelkwan there is no per request configuration for this but you can configure the timeouts through the There is |
@lachlan-roberts The connect timeout is the timeout for initializing the connection, not for the initial http upgrade request Please take a look the WebSocketUpgradeRequest is a HttpRequest. The initial value for timeout is 0. |
@lachlan-roberts Also, like I mentioned, even thou I use WebSocketClient.connect() and Future.get(Time), when you do future.cancel(true), the request stays in the httpexchange queue forever if you exceeded both the maxconnectionsperdestination and maxRequestsQueuedPerDestination and is unrecoverable unless you shutdown the client. |
@michaelkwan It will be simple enough to add the request timeout to the I think the Future was intended as more of a notification that the Session was available rather than a way to cancel the websocket handshake. This could be tricky to implement because the future isn't completed until the websocket connection and session has been opened. |
Signed-off-by: Lachlan Roberts <[email protected]>
@michaelkwan take a look at PR #5024 and let me know what you think. |
@lachlan-roberts thanks, i think that's sufficient. |
Signed-off-by: Lachlan Roberts <[email protected]>
and increase timeouts used for testing Signed-off-by: Lachlan Roberts <[email protected]>
…equestTimeout Issue #5018 - add request timeout onto ClientUpgradeRequest
…ail upgrade Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
…ntRequestTimeout Issue #5018 - add WebSocketClient UpgradeRequest timeout to jetty 10
…tConnectFuture Issue #5018 - cancellation of WebSocketClient.connect Future should fail upgrade
…ail upgrade Signed-off-by: Lachlan Roberts <[email protected]>
@michaelkwan we have also addressed the issue about cancelling the future in PR #5030, now if the Both these fixes will be in the 9.4.31 release which should be out in the next week or so. |
…uld fail upgrade Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
Jetty version
9.4.28
Java version
1.8.0.252
OS type/version
Centos 6
Description
WebSocketClient.connect(...) creates WebSocketUpgradeRequests with indefinite timeout. Even with the Future.cancel(), it would not cancel the requests.
This also leads to a big problem because: When the HttpDestination exchange queued exceeded, no new requests can be added. The requests stay in the queue forever.
Reproduction steps:
No new requests can be made, as queue is full.
The text was updated successfully, but these errors were encountered: