Linux增大watches数量

Linux2年前 (2023)更新 ENE
399 0 0

Linux增大watches数量

介绍

sysctlsfs.inotify.max_user_instances定义fs.inotify.max_user_watchesinotify 资源和 inotify 文件监视数量的用户限制。如果达到这些限制,您可能会遇到进程失败并显示与限制相关的错误消息,例如:

ENOSPC: System limit for number of file watchers reached...

The configured user limit (128) on the number of inotify instances has been reached 

The default defined inotify instances (128) has been reached

增大

echo "fs.inotify.max_user_watches = 99999999" >> /etc/sysctl.conf
echo "fs.inotify.max_user_instances = 999" >> /etc/sysctl.conf

# 生效
sysctl -p
© 版权声明

相关文章