1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Error: ENOSPC: System limit for number of file watchers reachedへの対処方法

Last updated at Posted at 2020-05-10

環境
OS:Ubuntu18.04
Node.js:12.16.1
npm:6.13.4

Linuxで監視できるファイル数の制限を超えると発生するエラー

監視ファイル数を確認する

$ cat /proc/sys/fs/inotify/max_user_watches
=> 8192

一時的に制限を設定する場合

$ sudo sysctl fs.inotify.max_user_watches = 524288
$ sudo sysctl -p

永続的に制限を設定する場合

$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
fs.inotify.max_user_watches=524288

$ sudo sysctl -p
=> fs.inotify.max_user_watches = 524288

参考
https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers#the-technical-details

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?