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
nebula
nebula3y ago
yeah this is a known issue @Angelo do you remember if there’s a workaround or not
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo3y ago
Project Id please so we can diagnose? Also: after how long does it disconnect?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo3y ago
Every session? Or intermittent
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo3y ago
Cool- waiting on that project id so we can investigate
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo3y ago
Yes ofc! (Just dont dm your credit card)
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo3y ago
That was it
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo3y ago
Project ID Command + K > project id
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo3y ago
Cool Investigating
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Web Dev Cody
Web Dev CodyOP3y ago
Railway
Railway
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
angelo
angelo3y ago
@yeah fr Project ID? Can you explain more about your project and the behavior?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo3y ago
😐 M u l t i a c c o u n t i n g hehe
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo3y ago
Just so long as you don’t have two Railway accounts
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo3y ago
Two Discords is fine I guess
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
nebula
nebula3y ago
@Angelo the OP is @Web Dev Cody
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Web Dev Cody
Web Dev CodyOP3y ago
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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
nebula
nebula3y ago
yup do you send a ping to the ws server on an interval? (is the ws idle or active basically)
Web Dev Cody
Web Dev CodyOP3y ago
Yes, from what i understand Socket.io sends ping pong messages for us already
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Web Dev Cody
Web Dev CodyOP3y ago
maybe it's a docker issue?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo2y ago
Railway | Help Center
WebSocket Connections Disconnecting
Steps to take to make sure that WebSockets are behaving as expected on the platform.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo2y ago
Yes, this applies too on outbound connections
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo2y ago
When you apply a custom domain, you are eschewing Envoy, our proxy, that has to kill outbound connections too.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo2y ago
Yes- let us know if it doesn't work. But 99.9 percent of time, its been successful.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo2y ago
This is how the system should work!
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
angelo
angelo2y ago
The old system had a much bigger issue with stuff being buried. Anyways, hope you are enjoying Railway 🙂
Want results from more Discord servers?
Add your server