Will a websocket connection keep a project alive?

I know that connecting to a websocket at first will keep the project alive, but will a websocket connection keep a project alive, or will the websocket be closed(with the container sleep) after 5 minutes?

From what I know it will most likely go to sleep after 5 minutes, but as long as your project is pinged every 5 minutes it will not sleep. You can use a third party tool like uptimerobot to keep it alive.


Ok, thanks! I already have a system of pinging to keep it alive, I was just wondering if a websocket alone could keep it alive, because I’m already going to have a websocket connection opened and it would be easier to just have that.

1 Like

+1 on this topic. Can anyone from the Glitch team speak to this directly? I am building a server that is not receiving requests, just subscribing via websockets to another server, so it would be great to know that as long as there is a subscription up and running, the project won’t sleep, since that is the only thing that will be running on my project, and I don’t really want to expose it to other network traffic just to keep it alive.

Thanks Glitch Team, I am loving this service!

Ha, just realizing the original post was from 2018 not 2019, lol. Maybe the answer is already out there…

Hey @tehpsalmist, welcome to the Glitch forum!

No, a websocket connection will not keep your project awake, I’m afraid. On the flip side, it will also not count against your projects hourly request limit. You’ll still need something external to keep your project awake.

Sorry for the bother!

Thanks @cori! Good to know the details! :slight_smile: