Skip to content

Commit

Permalink
Increase advised inotify max_user_watches
Browse files Browse the repository at this point in the history
Also explain the implications of the increase.

Fixes #236
  • Loading branch information
Tyriar committed Mar 17, 2016
1 parent 9fd132f commit 264d055
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/supporting/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,19 @@ sudo apt-get install gvfs-bin

### error ENOSPC

When you see this error, it indicates that the VS Code file watcher is running out of handles. To increase the limit open `/etc/sysctl.conf` and add this line to the end of the file:
When you see this error, it indicates that the VS Code file watcher is running out of handles. The current limit can be viewed by running:

```bash
cat /proc/sys/fs/inotify/max_user_watches
```
fs.inotify.max_user_watches=16384

The limit can be increased to its maximum by editing `/etc/sysctl.conf` and add this line to the end of the file:

```
fs.inotify.max_user_watches=524288
```

While 524288 is the maximum number of files that can be watched, if you're in an environment that is particularly memory constrained you may wish to lower the number. Each file watch [takes up 540 bytes (32-bit) or ~1kB (64-bit)](http://stackoverflow.com/a/7091897/1156119), so assuming that all 524288 watches are consumed that results in an upperbound of around 256MB (32-bit) or 512MB (64-bit).

### I can't see Chinese characters in Ubuntu

Expand Down

0 comments on commit 264d055

Please sign in to comment.