Skip to content

Instantly share code, notes, and snippets.

@mly520
Created October 11, 2013 02:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mly520/6928552 to your computer and use it in GitHub Desktop.
Save mly520/6928552 to your computer and use it in GitHub Desktop.
Lsyncd 監視対象ファイルの上限
Lsyncdが利用している inotifyが監視できるファイル数には上限があります。
この上限を超えると、Lsyncdは動作を停止 or 起動してくれません。
起動しようとすると、こんなエラーが発生します。(しました)
lsyncd: Error, Terminating since out of inotify watches.#012Consider increasing /proc/sys/fs/inotify/max_user_watches
ちなみに、上限値は以下で確認できます。
[root@cent6 ~]# cat /proc/sys/fs/inotify/max_user_watches
8192
[root@cent6 ~]#
これじゃ、ちょっと心もとないので、大きな値に変更します。
[root@centos6 ~]# cp -ip /etc/sysctl.conf{,.org}
[root@centos6 ~]# vi /etc/sysctl.conf
fs.inotify.max_user_watches = 819200
[root@centos6 ~]# /sbin/sysctl -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment