Skip to content
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

WebSocket Closing #674

Open
hrithwikbharadwaj opened this issue Aug 8, 2023 · 1 comment
Open

WebSocket Closing #674

hrithwikbharadwaj opened this issue Aug 8, 2023 · 1 comment

Comments

@hrithwikbharadwaj
Copy link

hrithwikbharadwaj commented Aug 8, 2023

I have a HA setup with Nchan (Redis Clusters + Load balancer with multiple EC2 Instances).

But When I subscribe to a channel using websocket, The Socket Connection is getting closed after 60 seconds.

I thought of doing a HeartBeat call every 60 seconds while subscribed to a channel but it doesn't allow it since the route is only for subscribing and not publishing(makes sense).

I tried increasing the timeout to 3600 in the load balancer , but the connection is getting closed after 5 minutes.
we might need active connection for more than 2 hours.

(Also this was not an issue when nchan was installed in single machine without loadbalancer)

Any Suggestions / Fix ?

@hrithwikbharadwaj
Copy link
Author

Update: Switched to SSE and added these directives

nchan_eventsource_ping_data "heartbeat";
nchan_eventsource_ping_interval 2;

but with Websockets, the below directive is not sending ping every x number of seconds
nchan_websocket_ping_interval 2;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant