I have a problem with Node.js and uploading files to server. For uploading files to server I use this plugin. When starting file upload to the server, Node.js process crashe
This sounds very odd, but yes, a system reboot or killall node
solves the problem for me.
ENOSPC
means that there is no space on the drive.
Perhaps /tmp
is full? You can configure npm
to use a different temp folder by setting npm config set tmp /path/to/some/other/dir
, or maybe delete everything out of the /tmp
folder.
Source: npm 1.1.21 cannot write, ENOSPC in npm's repo in github.
Note I solved my problem in the way that described in above source. However, see Murali Krishna's answer, which is more comprehensive.
Run the below command to avoid ENOSPC:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
For Arch Linux add this line to /etc/sysctl.d/99-sysctl.conf
:
fs.inotify.max_user_watches=524288
Then execute:
sysctl --system
This will also persist across reboots. Technical Details Source
I solved my problem killing all tracker-control processes (you could try if you use GDM, obviously not your case if the script is running on a server)
tracker-control -r
My setup: Arch with GNOME 3