Open
Description
This page shows how to increase the inotify watch limit.
Currently, watching source repositories in a few containers at the same time causes errors like this one (example from a PeerTube container):
> [email protected] dev /home/user/PeerTube
> scripty
[1]
[1] > [email protected] watch:server /home/user/PeerTube
[1] > scripty
[1]
[0]
[0] > [email protected] watch:client /home/user/PeerTube
[0] > scripty
[0]
[0]
[0] > [email protected] ng /home/user/PeerTube/client
[0] > ng "server" "--hmr" "--host" "0.0.0.0" "--port" "3000"
[0]
[1] [0]
[1] [0] > [email protected] tsc /home/user/PeerTube
[1] [0] > tsc "--sourceMap"
[1] [0]
[1] [1]
[1] [1] > [email protected] tsc /home/user/PeerTube
[1] [1] > tsc "--sourceMap" "-w"
[1] [1]
[1] [1] fs.js:1376
[1] [1] throw error;
[1] [1] ^
[1] [1]
[1] [1] Error: watch /home/user/PeerTube ENOSPC
[1] [1] at _errnoException (util.js:1022:11)
[1] [1] at FSWatcher.start (fs.js:1374:19)
[1] [1] at Object.fs.watch (fs.js:1400:11)
[1] [1] at watchPresentDirectory (/home/user/PeerTube/node_modules/typescript/lib/tsc.js:2635:42)
[1] [1] at fsWatchDirectory (/home/user/PeerTube/node_modules/typescript/lib/tsc.js:2620:21)
[1] [1] at Object.watchDirectory (/home/user/PeerTube/node_modules/typescript/lib/tsc.js:2768:28)
[1] [1] at addDirectoryWatcher (/home/user/PeerTube/node_modules/typescript/lib/tsc.js:56930:21)
[1] [1] at Object.watchDirectory (/home/user/PeerTube/node_modules/typescript/lib/tsc.js:59955:20)
[1] [1] at createDirectoryWatcher (/home/user/PeerTube/node_modules/typescript/lib/tsc.js:59381:35)
[1] [1] at watchFailedLookupLocationOfResolution (/home/user/PeerTube/node_modules/typescript/lib/tsc.js:59348:81)
[1] [1] npm ERR! code ELIFECYCLE
[1] [1] npm ERR! errno 1
[1] [1] npm ERR! [email protected] tsc: `tsc "--sourceMap" "-w"`
[1] [1] npm ERR! Exit status 1
[1] [1] npm ERR!
[1] npm ERR! Failed at the [email protected] tsc script.
[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1] [1]
[1] [1] npm ERR! A complete log of this run can be found in:
[1] [1] npm ERR! /home/user/.npm/_logs/2018-01-25T10_51_56_946Z-debug.log
[1] [1] npm run tsc -- --sourceMap -w exited with code 1
[1] --> Sending SIGTERM to other processes..
[1] [0] npm run tsc -- --sourceMap && npm run nodemon -- --delay 2 --watch ./dist dist/server exited with code null
[1] npm ERR! code ELIFECYCLE
[1] npm ERR! errno 1
[1] npm ERR! [email protected] watch:server: `scripty`
[1] npm ERR! Exit status 1
[1] npm ERR!
[1] npm ERR! Failed at the [email protected] watch:server script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1]
[1] npm ERR! A complete log of this run can be found in:
[1] npm ERR! /home/user/.npm/_logs/2018-01-25T10_51_57_076Z-debug.log
[1] npm run watch:server exited with code 1
--> Sending SIGTERM to other processes..
[0] npm run watch:client exited with code null
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `scripty`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/user/.npm/_logs/2018-01-25T10_51_57_234Z-debug.log
Process exited with code: 1
Note: Both Kresus and PeerTube projects are known to use the same watch method.