Skip to content

Instantly share code, notes, and snippets.

@aamnah
Last active March 27, 2019 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aamnah/e488b6d1ca16cb2bd0805cf611d9276e to your computer and use it in GitHub Desktop.
Save aamnah/e488b6d1ca16cb2bd0805cf611d9276e to your computer and use it in GitHub Desktop.
Increase file watchers (error ENOSPC)
# sudo nano /etc/sysctl.conf
###################################################################
# Increase the number for files being watched
# Default is: 8192 (files that can be watched)
# One file watch roughly takes 1kb.
# 1048576 files being watched would take a max of 1GB of memory
#
# Gets rid of (error ENOSPC) given by Node and VS Code
# https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc
#
fs.inotify.max_user_watches=1048576
# sudo sysctl -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment