Hi everyone,
I’m facing a periodic “server hang” issue in a Jmix (2.6) + Vaadin Flow application.
I collected several thread dumps during the freeze, and the pattern is always the same.
What I see in the thread dumps:
• Many threads are stuck waiting inside:
com.vaadin.flow.server.VaadinSession.lock()
io.jmix.flowui.sys.SessionHolder.getVaadinSessionState()
io.jmix.flowui.UiEventPublisher.publishEventForUsersInternal()
• Example of dump
thread-dump-1-2025-11-18-134017.txt (595.3 KB)
thread-dump-2-2025-11-18-134017.txt (662.9 KB)
thread-dump-3-2025-11-18-134017.txt (681.8 KB)
• All Tomcat request threads eventually block
• UI stops responding
• Server appears alive but becomes completely frozen
• No CPU spike, no deadlock → just long-running session locks
My assumptions:
VaadinSession-level locking looks too aggressive when:
• Hazelcast cluster events are published,
• UiEventPublisher tries to reach multiple sessions,
• background threads attempt UI access indirectly.
This creates a long queue of waiting threads, which leads to a hang-like state.
Questions:
- Is this a known issue in Jmix 2.6 or Vaadin Flow regarding session locking?
- Should UI event publishing be avoided from Hazelcast listener threads?
- Is there a recommended way to decouple cluster events from VaadinSession locks?
- Any guidance on how to reduce lock contention or configure safer async event handling?