You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Handle "Unexpected message id" errors after hard pod shutdown #267
We are investigating issues caused by "hard pod shutdowns" (e.g., OOMKilled or node failures where SIGKILL is sent). When a pod is terminated abruptly, the standard graceful shutdown hooks do not run.
If this termination occurs during or before the latest UI changes are serialized to Hazelcast, the distributed session state becomes stale or incomplete. When the client attempts to reconnect to a new healthy pod, the client-side state (UI message ID) is ahead of the server-side state (deserialized from Hazelcast).
This results in the server throwing an Unexpected message id from the client error, which currently manifests as a broken UI for the end user.
Current Behavior
Pod A processes a user interaction but is SIGKILLed before it can serialize the updated UI state to Hazelcast.
The Client detects the connection loss and automatically reconnects.
Kubernetes routes the request to Pod B.
Pod B retrieves the session from Hazelcast, but this session data is stale (missing the latest state).
The Client sends a request with Message ID: X.
Pod B expects Message ID: X-1 (or earlier).
Result: Pod B throws Unexpected message id from the client. The client receives a generic error or hangs, forcing the user to manually refresh.
Expected Behavior
The application should gracefully recover from this desynchronization. If the UI state cannot be restored because the serialization never happened, the client should automatically trigger a UI State Re-synchronization (full page reload) rather than leaving the user in a broken state.
Technical Context
Environment: Kubernetes
Clustering: Hazelcast
Error: java.lang.IllegalStateException: Unexpected message id from the client
Reloading the page without notify the user seems not to be a good option for user experience.
I wonder if this can be "fixed" in Flow, by throwing a specific exception when the issue happens, instead of illegal state exception. Then a new case can be added to system messages, so the developer can customize messages and behaviors (notification vs silent reload)
Activity
mcollovati commentedon Dec 15, 2025
Reloading the page without notify the user seems not to be a good option for user experience.
I wonder if this can be "fixed" in Flow, by throwing a specific exception when the issue happens, instead of illegal state exception. Then a new case can be added to system messages, so the developer can customize messages and behaviors (notification vs silent reload)
feat: Add customizable sync error messages for session desync scenarios
feat: Add customizable sync error messages for session desync scenarios
feat: Add customizable sync error messages for session desync scenari…