Skip to content

Commit

Permalink
docs: handling "System limit for number of file watchers reached" err…
Browse files Browse the repository at this point in the history
…or (apache#25551)

Co-authored-by: Sam Firke <sfirke@users.noreply.github.com>
  • Loading branch information
nitish-samsung-jha and sfirke committed Mar 22, 2024
1 parent 5fdcf1b commit 0d7763b
Showing 1 changed file with 25 additions and 0 deletions.
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).

Open the file in editor and add a line at the bottom specifying the max watches values.
```bash
fs.inotify.max_user_watches=524288
```
Save the file and exit editor.
To confirm that the change succeeded, run the following command to load the updated value of max_user_watches from sysctl.conf:
```bash
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

0 comments on commit 0d7763b

Please sign in to comment.