[lxc-users] nodejs module fs in forever failing in cloned container

Mittelsdorf, Bjoern Bjoern.Mittelsdorf at scheer-group.com
Tue Oct 27 12:39:01 UTC 2015

Hi all,

I get an exception in a forever start routine in one of my containers. Funny thing is: It works in the original container but fails in clones of the original container.

I am pretty sure this is no lxc problem but a nodejs.forever or even a nodejs.fs problem, but maybe somebody has an idea for a hint.

My forever call starts a script and watches for file changes so it can restart the script. This works fine in the original but fails in the clone:

      throw er; // Unhandled 'error' event
Error: watch ENOSPC
    at exports._errnoException (util.js:746:11)
    at FSWatcher.start (fs.js:1172:11)
    at Object.fs.watch (fs.js:1198:11)
    at createFsWatchInstance (/var/share/nodejs/lib/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/var/share/nodejs/lib/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at EventEmitter.NodeFsHandler._watchWithNodeFs (/var/share/nodejs/lib/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at EventEmitter.NodeFsHandler._handleFile (/var/share/nodejs/lib/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/lib/nodefs-handler.js:255:21)
    at EventEmitter.<anonymous> (/var/share/nodejs/lib/node_modules/forever/node_modules/forever-monitor/node_modules/chokidar/lib/nodefs-handler.js:468:21)
    at FSReqWrap.oncomplete (fs.js:95:15)

Other people having issues with forever talked about 

fs.inotify.max_user_watches=524288 in /etc/sysctl.conf

User watches are not accumulated over all containers, or are they?

Best regards


More information about the lxc-users mailing list