lsync_inotify_watches
This is an old revision of the document!
Sometimes lsync stops working and the error message you receive is relating to increasing inotify watches.
To calculate an estimate on the inotify values you can run the following command:
find /var/www/vhosts/ -type d | wc -l | awk '{print $1" directories needs monitoring, set [ fs.inotify.max_user_watches = " $1*3" ]"}'
To perm change the value:
echo "fs.inotify.max_user_watches=value >> /etc/sysctl.conf sysctl -p /etc/sysctl.conf
To see what is currently being used by inotify watches you can run:
for foo in /proc/*/fd/*; do readlink -f $foo; done |grep inotify |cut -d/ -f3 |xargs -I '{}' -- ps --no-headers -o '%p %U %c' -p '{}' |uniq -c |sort -nr
lsync_inotify_watches.1489652882.txt.gz · Last modified: 2024/05/23 07:26 (external edit)