Websocket no longer listens to events and no error returns.
Project Id:
32e7c04c-c58a-41a6-9e8c-320a473294f7
Dear Railway Support,
I hope this message finds you well. I am writing to report a problem with my websocket server, which has stopped listening to events and does not return any errors. Despite this, the get headers always show a status of 200.
I have considered several possible avenues for investigation, including an error occurring when opening the binding with the client or the websocket destroying the connection without restarting it. As a temporary solution, I have tried restarting the server, but this has not resolved the issue.
Unfortunately, there is no information in the logs that indicates what is causing the problem. I would greatly appreciate any assistance you could provide in resolving this issue, as it is impacting my ability to effectively use the websocket server.
It is possible that the issue with your websocket server could be related to this code. If the websocket connection is being terminated for some reason, the server will not be able to receive events until a new connection is established. To diagnose the issue, you may want to log the state of the websocket connection at different points in the code and see if the terminate() function is being called unexpectedly.
Thank you for your time and attention to this matter.
Sincerely, Yannick.4 Replies
Project ID:
32e7c04c-c58a-41a6-9e8c-320a473294f7
You might find these helpful:
- NodeJS server does not use connection keep-alive anymore
- Websocket Disconnecting After Time
- Socket disconnects after 10 minutes
⚠️ experimental feature
My websocket sleeps like when a serverless node.js app shuts down after some time of inactivity.
Unlike a serverless, no broken or complaining my websocket which has a KEEP_ALIVE_CHECK_INTERVAL stays in deep sleep.
Do you have an idea ?
Could it be an nginx program shutdown with a proxy timeout?
I've got the same problem. Did you find a solution? I am using a custom domain already