I am hosting a nodejs (express) server using socket.io on Heroku. After a certain amount of time, I will be unable to access the server from a client - the socket requests will not receive a response. However, once I reload the root web page, I am able to access it. Why is this the case?
Asked
Active
Viewed 395 times
1
-
does this happen locally or just when launched on heroku? – Eliezer Wohl Jan 02 '17 at 03:21
-
Do you have any logging on it at all? – R.A. Lucas Jan 02 '17 at 03:30
-
1Are you using free Dynos, or paid ones? – ChrisGPT was on strike Jan 02 '17 at 04:47
-
I'm using free Dynos - do I need to use paid ones in order to get it to work? – Jake Jan 02 '17 at 06:00
1 Answers
0
I figured out that I need to upgrade to paid (hobby at minimum) Dynos, otherwise the app will go to sleep after 30 minutes of inactivity.

Jake
- 73
- 2
- 6
-
Actually there are lots of ways to prevent free dynos from sleeping. See http://stackoverflow.com/questions/40646858/avoid-heroku-server-from-sleeping/40647411#40647411 for details. – Yoni Rabinovitch Jan 02 '17 at 10:02