Socket disconnects after 10 minutes
luis-herasme
PROOP

3 years ago

Hi, I have a project with node.js, and I use ws as the socket library. The socket connection closes after 10 minutes, even if messages are sent back and forward between the client and the server. I think the problem is not related to my code because when I run the server locally, I do not get the socket disconnected error, and the error code is 1006.

Is there any socket connection duration limit in the default configuration for the free tier?

30 Replies


3 years ago

oof


luis-herasme
PROOP

3 years ago

Wow


luis-herasme
PROOP

3 years ago

That was fast


luis-herasme
PROOP

3 years ago

Thanks


luis-herasme
PROOP

3 years ago

N/A


When you proxy requests at Railway scale, keep alive connections have to be killed.


luis-herasme
PROOP

3 years ago

So the only way to solve this problem is to add a domain?



Our guess, could be wrong is that if you are hosting a realtime application, it's likely its a serious usecase. Hence, most people who need it would likely be using a domain.


We have a fix on the way, but it will be a long time till we get to it.


luis-herasme
PROOP

3 years ago

Ok, thanks a lot


luis-herasme
PROOP

3 years ago

The problem persists after adding a domain


Yes, so the other thing you need to do is -> send some keepalive traffic on your websocket every 10-30 secs (socketio does this with websocket pings by default) so that you don't hit any TCP idle timeouts.


You are likely hitting timeouts


luis-herasme
PROOP

3 years ago

Thanks, but I'm already doing it


luis-herasme
PROOP

3 years ago

And it happens exactly after 10 minutes


Not great then, will talk to our engineer on that once they are awake.


What are you trying to host on here?


Personal project? Very commerical mission critical workload?


This will help me determine the priority.


luis-herasme
PROOP

3 years ago

A game


gtocha


luis-herasme
PROOP

3 years ago

It is in development


cool: project id?


luis-herasme
PROOP

3 years ago

576c94c0-d93a-420e-a522-38cd07a04f0f


luis-herasme
PROOP

3 years ago

The problem is solved now I did not update the URL of the socket


luis-herasme
PROOP

3 years ago

Thanks for your time


mrcatnip
PRO

9 months ago

this thread is gone, damn


9 months ago

@antoniobelluci if your websockets are disconnecting see this thread https://discord.com/channels/713503345364697088/1385626689802997906

team is aware


Loading...