Websocket Disconnecting After Time
I have a socket.io web socket server which I'm deploying to railway. After some random amount of time, the my connections are getting disconnected. This does not happen when I run this same code locally. It also doesn't happen when I use a digitalocean droplet. Anyone know what is going on that is railway specific with socket.io websockets disconnecting?
45 Replies
yeah this is a known issue
@Angelo do you remember if there’s a workaround or not
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Project Id please so we can diagnose?
Also: after how long does it disconnect?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Every session?
Or intermittent
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Cool- waiting on that project id so we can investigate
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Yes ofc!
(Just dont dm your credit card)
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
That was it
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Project ID
Command + K > project id
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Cool
Investigating
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Railway
Railway
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
@yeah fr
Project ID? Can you explain more about your project and the behavior?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
😐
M u l t i a c c o u n t i n g hehe
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Just so long as you don’t have two Railway accounts
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Two Discords is fine I guess
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
@Angelo the OP is @Web Dev Cody
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
The use case is I have a simple game that starts a web socket server
I open two tabs and I’m connected
The randomly users get disconnected
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
yup
do you send a ping to the ws server on an interval?
(is the ws idle or active basically)
Yes, from what i understand Socket.io sends ping pong messages for us already
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
maybe it's a docker issue?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
No they wont: reason being here: https://help.railway.app/troubleshooting/hKqw9Dr1moxfDySTy98E6G/websocket-connections-disconnecting/sb6bfjV6UnuMwkRyAvQ3Sb
Railway | Help Center
WebSocket Connections Disconnecting
Steps to take to make sure that WebSockets are behaving as expected on the platform.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yes, this applies too on outbound connections
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
When you apply a custom domain, you are eschewing Envoy, our proxy, that has to kill outbound connections too.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yes- let us know if it doesn't work.
But 99.9 percent of time, its been successful.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
This is how the system should work!
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
The old system had a much bigger issue with stuff being buried.
Anyways, hope you are enjoying Railway 🙂