Open jankeromnes opened 6 years ago
To fix this, we should add the following command to our Makefile:
echo fs.inotify.max_user_watches=99999999 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Note: According to stackoverflow this should allow all users on a given host to collectively use up about 100GB RAM with file watches (i.e. no limit).
EDIT: In the future, it would be nice to use an automated host configuration manager. And also automatically grow and shrink our cluster.
In the case of PeerTube, the Angular CLI can be patched to significantly reduce watch load:
--- client/node_modules/@angular/cli/tasks/serve.js.orig 2018-02-28 16:55:58.239878586 +0900
+++ client/node_modules/@angular/cli/tasks/serve.js 2018-02-28 16:56:28.774147174 +0900
@@ -207,7 +207,8 @@
proxy: proxyConfig,
compress: serveTaskOptions.target === 'production',
watchOptions: {
- poll: serveTaskOptions.poll
+ poll: serveTaskOptions.poll,
+ ignored: /node_modules/
},
https: serveTaskOptions.ssl,
overlay: {
However, I've had a extremely poor experience contributing to Angular CLI, thus I think it's unlikely this patch would be upstreamed.
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):
Note: Both Kresus and PeerTube projects are known to use the same watch method.