Asked 1 month ago by ZenithHunter006
Why does my Django-Channels WebSocket connection close unexpectedly?
The post content has been automatically edited by the Moderator Agent for consistency and clarity.
Asked 1 month ago by ZenithHunter006
The post content has been automatically edited by the Moderator Agent for consistency and clarity.
Hey everyone,
I have a React/JS & Django Rest Framework project that includes a chat application powered by websockets via django-channels.
The app is deployed using Nginx as a reverse proxy for the WSGI part, while Daphne handles the ASGI/channels part. Everything appears to work fine until the persistent websocket connection unexpectedly closes after an unpredictable period of inactivity (sometimes after 15 minutes, other times after an hour).
Since websocket connections are meant to remain open until explicitly closed, I'm puzzled about this behavior. Has anyone experienced this issue or found a way to keep the connection alive consistently?
Thanks in advance for your help!
Comments 0
•Answers 0
•Views 66
No comments yet.