-
Notifications
You must be signed in to change notification settings - Fork 168
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
ViteWebsocketConnection hangs when running with low resource #20586
Comments
Logs from a completed connection
Logs from a blocked connection attempt
You can see in the first logs that there's In the other logs, there's only |
Completing the websocket future in onOpen event prevents the connection to hang indefintely when application run on low resources. Fixes #20586
Completing the websocket future in onOpen event prevents the connection to hang indefintely when application run on low resources. Fixes #20586
Completing the websocket future in onOpen event prevents the connection to hang indefintely when application run on low resources. Fixes #20586
* fix: complete client websocket future on open Completing the websocket future in onOpen event prevents the connection to hang indefintely when application run on low resources. Fixes #20586 * apply review suggestions
* fix: complete client websocket future on open Completing the websocket future in onOpen event prevents the connection to hang indefintely when application run on low resources. Fixes #20586 * apply review suggestions
* fix: complete client websocket future on open Completing the websocket future in onOpen event prevents the connection to hang indefintely when application run on low resources. Fixes #20586 * apply review suggestions Co-authored-by: Marco Collovati <[email protected]>
This ticket/PR has been released with Vaadin 24.6.0.rc1 and is also targeting the upcoming stable 24.6.0 version. |
Description of the bug
When running in dev mode on a machine with low resources, ViteWebsocketConnection sometimes hangs because of waiting on locks.
I've seen this happen mostly on Quarkus projects running tests in dev-mode on GH actions.
But it can be reproduced locally by decreasing the size of the fork join pool and vertx event loop pool.
It looks like the problem is that sometime the
clientWebsocket
future inViteWebsocketConnection
never completes, probably because asend
is invoked beforewhenComplete
can finish it work.A potential solution is to complete the future in
onOpen
, so that asend
operation will not block indefinitely waiting forwhenComplete
.The issue does not happen with Vaadin 24.5, so it could be related to changes introduced by Vite 6.
Below, a thread dump from a hanging app
Expected behavior
Vite websocket connection should complete successfully and not block the application.
Minimal reproducible example
application.properties
quarkus-maven-plugin
configuration and enable Vaadin frontend hot deploymvn quarkus:dev
Versions
The text was updated successfully, but these errors were encountered: