I have been trying out the free tier of Web Services and I have a Node application that uses Socket.io. However, I am having a problem that my websocket connection automatically gets closed exactly after 5 minutes of inactivity.
Although when I run the same server on Localhost I can stay connected for as long as I want and the connection doesn’t get automatically closed.
Is it some sort of Timeout that has been set by default on free web services? I am hesitant to upgrade to a paid tier if this problem still persists.
Our free tier services do automatically spin down after 15 minutes of inactivity. However, if you are seeing this after 5 minutes, that does seem a bit premature. Please feel free to DM me with the details of your service and we’ll be happy to take a closer look.
I seem to have the same issue, after about 5 minutes on the Free Tier (the server is active during that time) my open web sockets get closed. I just transferred my app from Heroku and I didn’t see this issue over there so I’m sure it’s not my code/application.
We have confirmed there is an open issue that causes long-running connections, such as websockets, to timeout on the free tier. We will update this thread once this limitation has been resolved. Very sorry for the trouble here!
I have a similar problem. I am using Socket.io with Nuxt 3. The WebSocket works great on the local server but on Render it doesn’t work. It throws an error of web socket error.
Jake says this is a limitation of the free tier here:
It’s happening to me, too. This is very clearly deliberate. Socket connections are dropped after exactly 5 minutes regardless of activity. It would be very nice to add this to the documentation.
This issue is still persistent even for paid plan. My app basically depends on this functionality to do most everything could you please help me out on this.
hello, i have a backend code that uses SOCKET IO for real time notification, its working locally on my system but when i push the code to git hub and the deploy version of it try to update and redeploy on render it through this error : " Error: Cannot find module ‘./utils/socket’
Aug 27 03:04:00 PMRequire stack:
Aug 27 03:04:00 PM- /opt/render/project/src/index.js"… everything is linked and working well locally on my system… please is this a render hosting error ?