From 9fd132f17929d9496ad33ab2eb42a353fc73c8e1 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 17 Mar 2016 10:29:38 -0700 Subject: [PATCH 1/6] Remove md inline code tags from Linux inotify advice --- docs/supporting/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/supporting/faq.md b/docs/supporting/faq.md index 5c1aedbd43..22f7076acb 100644 --- a/docs/supporting/faq.md +++ b/docs/supporting/faq.md @@ -143,7 +143,7 @@ sudo apt-get install gvfs-bin 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: ``` -`fs.inotify.max_user_watches=16384` +fs.inotify.max_user_watches=16384 ``` ### I can't see Chinese characters in Ubuntu From 264d055728f5bf9304e45fcb351a33b9f5e20408 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 17 Mar 2016 10:39:54 -0700 Subject: [PATCH 2/6] Increase advised inotify max_user_watches Also explain the implications of the increase. Fixes #236 --- docs/supporting/faq.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/supporting/faq.md b/docs/supporting/faq.md index 22f7076acb..be7e87e99c 100644 --- a/docs/supporting/faq.md +++ b/docs/supporting/faq.md @@ -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 From 270aac434b9efeddd65c2ae205ef6c2f4a9fedb3 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 17 Mar 2016 10:42:31 -0700 Subject: [PATCH 3/6] Advice how to refresh inotify's config Fixes #235 --- docs/supporting/faq.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/supporting/faq.md b/docs/supporting/faq.md index be7e87e99c..df7e7bc62f 100644 --- a/docs/supporting/faq.md +++ b/docs/supporting/faq.md @@ -152,6 +152,8 @@ The limit can be increased to its maximum by editing `/etc/sysctl.conf` and add fs.inotify.max_user_watches=524288 ``` +The new value can then be loaded in by running `sudo sysctl -p`. + 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 From 2fcc2679222c885f1ed8191d0b32f0260c1f80f2 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 17 Mar 2016 10:44:26 -0700 Subject: [PATCH 4/6] Add inotify config advice for ArchLinux --- docs/supporting/faq.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/supporting/faq.md b/docs/supporting/faq.md index df7e7bc62f..95aae1fad8 100644 --- a/docs/supporting/faq.md +++ b/docs/supporting/faq.md @@ -146,13 +146,13 @@ When you see this error, it indicates that the VS Code file watcher is running o cat /proc/sys/fs/inotify/max_user_watches ``` -The limit can be increased to its maximum by editing `/etc/sysctl.conf` and add this line to the end of the file: +The limit can be increased to its maximum by editing `/etc/sysctl.conf` and adding this line to the end of the file: ``` fs.inotify.max_user_watches=524288 ``` -The new value can then be loaded in by running `sudo sysctl -p`. +The new value can then be loaded in by running `sudo sysctl -p`. Note that ArchLinux works a little different, [view this page for advice](https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers). 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). From 31a1b7a74d8195cdcec8bb7a603d562d836d4b17 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 17 Mar 2016 11:03:21 -0700 Subject: [PATCH 5/6] Fix grammar --- docs/supporting/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/supporting/faq.md b/docs/supporting/faq.md index 95aae1fad8..f908daf951 100644 --- a/docs/supporting/faq.md +++ b/docs/supporting/faq.md @@ -152,7 +152,7 @@ The limit can be increased to its maximum by editing `/etc/sysctl.conf` and addi fs.inotify.max_user_watches=524288 ``` -The new value can then be loaded in by running `sudo sysctl -p`. Note that ArchLinux works a little different, [view this page for advice](https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers). +The new value can then be loaded in by running `sudo sysctl -p`. Note that ArchLinux works a little differently, [view this page for advice](https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers). 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). From cd91289310225daabbe4a04dd503822d1d3a5cc2 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 17 Mar 2016 11:04:18 -0700 Subject: [PATCH 6/6] Fix grammar --- docs/supporting/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/supporting/faq.md b/docs/supporting/faq.md index f908daf951..bc18ef104a 100644 --- a/docs/supporting/faq.md +++ b/docs/supporting/faq.md @@ -154,7 +154,7 @@ fs.inotify.max_user_watches=524288 The new value can then be loaded in by running `sudo sysctl -p`. Note that ArchLinux works a little differently, [view this page for advice](https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers). -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). +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