lsync_inotify_watches
Sometimes lsync stops working and the error message you receive is relating to increasing inotify watches.
View Current config
cat /proc/sys/fs/inotify/max_user_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.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1