I am fairly new to all of these technologies (including somewhat JavaScript) so you might have to bear with me here.
I followed the ChatApp tutorial over at Socket.IO do
I also encountered this error after not using my Node app for several weeks. The reason appeared to be that not only had the app gone to sleep, but the database and its connection had too. I'm using a free MongoDB instance hosted by MongoLab.
I fixed this by running my local copy of the app, causing MongoLab to awaken. Then after a few minutes, my Heroku-hosted app started working again.