Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: handling "System limit for number of file watchers reached" error #25551

Merged
merged 7 commits into from
Nov 16, 2023
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,31 @@ Then put this:
export NODE_OPTIONS=--no-experimental-fetch
```

If while using the above commands you encounter an error related to the limit of file watchers:

```bash
Error: ENOSPC: System limit for number of file watchers reached
```
The error is thrown because the number of files monitored by the system has reached the limit.
You can address this this error by increasing the number of inotify watchers.


The current value of max watches can be checked with:
```bash
cat /proc/sys/fs/inotify/max_user_watches
```
Edit the file /etc/sysctl.conf to increase this value.
The value needs to be decided based on the system memory.[(see this StackOverflow answer for more context)](https://stackoverflow.com/questions/535768/what-is-a-reasonable-amount-of-inotify-watches-with-linux)
nitish-samsung-jha marked this conversation as resolved.
Show resolved Hide resolved

Open the file in editor and add a line at the bottom specifying the max watches values.
```bash
fs.inotify.max_user_watches=524288
sfirke marked this conversation as resolved.
Show resolved Hide resolved
```
Save the file and exit editor.
Run following command to load the updated value of max_user_watches from sysctl.conf
nitish-samsung-jha marked this conversation as resolved.
Show resolved Hide resolved
```bash
sfirke marked this conversation as resolved.
Show resolved Hide resolved
sudo sysctl -p
```
#### Webpack dev server

The dev server by default starts at `http://localhost:9000` and proxies the backend requests to `http://localhost:8088`.
Expand Down