New problems during fresh install (Easy install)

After bench udate --reset and
bench start

i got following error:

16:25:47 watch.1          | Wrote css/erpnext.css - 8.08 KB
16:25:47 watch.1          | Wrote js/erpnext-web.min.js - 3.96 KB
16:25:47 watch.1          | Wrote js/erpnext.min.js - 154.7 KB
16:25:47 watch.1          | Wrote js/item-dashboard.min.js - 8.14 KB
16:25:48 watch.1          | events.js:160
16:25:48 watch.1          |       throw er; // Unhandled 'error' event
16:25:48 watch.1          |       ^
16:25:48 watch.1          |
16:25:48 watch.1          | Error: watch /home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/asset_category_account/ ENOSPC
16:25:48 watch.1          |     at exports._errnoException (util.js:1020:11)
16:25:48 watch.1          |     at FSWatcher.start (fs.js:1451:19)
16:25:48 watch.1          |     at (fs.js:1478:11)
16:25:48 watch.1          |     at createFsWatchInstance (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:37:15)
16:25:48 watch.1          |     at setFsWatchListener (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:80:15)
16:25:48 watch.1          |     at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:228:14)
16:25:48 watch.1          |     at FSWatcher.NodeFsHandler._handleFile (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:255:21)
16:25:48 watch.1          |     at FSWatcher.<anonymous> (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:473:21)
16:25:48 watch.1          |     at FSReqWrap.oncomplete (fs.js:123:15)
16:25:48 system           | watch.1 stopped (rc=0)

what went wrong? Can anybody help?

Check this

We are in the same boat Ravi, I can’t seem to get past this, even with the fix specified… Is there a possibility you can outline your steps to install, including changes of root user or as another user, etc.?


I know the popular answer to this is a space problem which is fixed by increasing the inotify parameters, but if you check your logs and there ISN’T a space problem, then it is not really a solution, just a temporary plaster on a festering wound. More watches is more RAM.
This article offers some other things to look at node.js - Grunt watch error - Waiting...Fatal error: watch ENOSPC - Stack Overflow

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

helped for me.

I have 30GB of space and 4 GB of memory.

1 Like

I’m guessing that 30GB of free space would probably not result in
ENOSPC 28 /* No space left on device */
(Thanks @clarkej for this list of Linux System Errors)

trentmu that stackoverflow item says rather than increase the inotify limit, to run instead ‘npm dedupe’ that trims some npm module list size.

Possibly ENOSPC is node’s way to signal the node module list size limit has been reached - each inotify watch uses say 1K of kernel memory so a high inode limit has a price - so best to run ‘npm dedupe’

linux - Kernel inotify watch limit reached - Unix & Linux Stack Exchange

1 Like

Yes sir. If one were to always up the watches to the max, the potential (if it were reached) would be 512MB of RAM wastage.
Reaching the limit is an unlikely scenario, but still worth being aware of. Mostly I just wanted guys to note what you said before - maybe check disk space before deciding it’s a disk space error because the code matches - and check the logs

1 Like

starting from systemd version 207 sysctl will load config from /etc/sysctl.d/yourconfig.conf file so the command may change to this according to your version of systemd

echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system

1 Like