I left this running overnight and when I looked at it in the morning I noticed my server was completely idle. The process (hapi
) appeared to still be running, but it was idle. I had been running the server using forever but since hapi never actually crashes I suppose that doesn't really do anything :)
manually restarting the server brought it back to operating and I decided to remove request logging for now.
The alarming part here isn't that the logs failed to be written but that hapi seems to have stopped accepting requests once this error was encountered.
{
"event": "error",
"url": {
"protocol": null,
"slashes": null,
"auth": null,
"host": null,
"port": null,
"hostname": null,
"hash": null,
"search": "OMITTED",
"query": "OMITTED",
"pathname": "OMITTED",
"path": "OMITTED",
"href": "OMITTED"
},
"method": "get",
"timestamp": 1389053530597,
"message": "Uncaught error",
"stack": [
"Error: EMFILE, too many open files",
" at Object.internals.ProcessMonitor.memory [as psmem] (/OMITTED/node_modules/good/lib/process.js:71:26)",
" at /OMITTED/node_modules/good/node_modules/async/lib/async.js:521:25",
" at /OMITTED/node_modules/good/node_modules/async/lib/async.js:108:13",
" at Array.forEach (native)",
" at _each (/OMITTED/node_modules/good/node_modules/async/lib/async.js:32:24)",
" at Object.async.each (/OMITTED/node_modules/good/node_modules/async/lib/async.js:107:9)",
" at _parallel (/OMITTED/node_modules/good/node_modules/async/lib/async.js:520:20)",
" at Object.async.parallel (/OMITTED/node_modules/good/node_modules/async/lib/async.js:536:9)",
" at opsFunc (/OMITTED/node_modules/good/lib/monitor.js:172:23)",
" at wrapper [as _onTimeout] (timers.js:252:14)"
]
}
for reference, my options
are rougly:
var good_options = {
subscribers: {
'console': ['ops', 'log', 'error'],
'/OMITTED/access.log': ['request'],
'/OMITTED/error.log': ['error']
},
leakDetection: true,
maxLogSize: 1073741824
};
system
I tried setting my ulimit very low to force the exception; nothing happened. I tried setting my ulimit very high to avoid the exception; still occurred.