Subject: Issues with Rocket.Chat Real-Time Events in Docker Swarm Cluster
Message:
Hello Rocket.Chat Community,
We’re currently facing an issue with real-time events in our Rocket.Chat setup, and I’d appreciate any insights or advice on how to resolve it.
Environment Details:
- Rocket.Chat Version: 4.6
- Deployment: Docker Swarm cluster with multiple Rocket.Chat app instances and a single MongoDB instance.
Problem Description: After our Rocket.Chat cluster has been up and running for about 2-3 weeks, we start experiencing issues with the real-time event system. Here’s the specific behavior:
- Clients establish WebSocket connections successfully and subscribe to events like
rooms-changed
andsubscriptions-changed
. - The WebSocket connection acknowledges that the subscription to these events is added.
- However, when a change occurs (e.g., a user sends a message in a room), other subscribed clients do not receive the real-time updates for these events.
- As a result, clients are connected, and subscriptions are active, but no updates (like new messages) are received in real-time.
Temporary Solution: Restarting the Rocket.Chat app instances in the Docker Swarm cluster seems to temporarily resolve the issue, and the events start working again as expected.
Request for Assistance:
- Has anyone encountered a similar issue with Rocket.Chat events in a Docker Swarm setup?
- Are there any known configurations, timeouts, or settings that could cause WebSocket events to stop working over time?
- What would you recommend as a solution to ensure real-time events work consistently without requiring periodic restarts?
Thank you for your help!