I have a pretty simple server using the normal pattern containing `http.createServer`. When testing, it works great. But when the server has been sitting idle with no access for a few hours it behaves strangely.
After the idle time, when I try to load the site the server responds perfectly for one request. The result gets back to the client. On the second and later requests the client reports "net::ERR_CONNECTION_RESET". The log on the server from my console.log statements shows the first interaction and then abruptly ends. There is no error. Looking at the process list shows the node process died silently with no exception printed out.
I have been going crazy trying to figure out how to debug this. Peppering my code with debug logging shows nothing. I put in memory/heap checking and gave the site some traffic and there was no memory leak. Also, having a problem after being idle doesn't match any resource exhaustion I can think of.
Does anyone have any idea what can cause silent dying? Is there some debug option I can enable inside of node? It would be great to observe the last thing node executed.