在ubuntu上运行service服务报错:
Failed to allocate directory watch: Too many open files
解决方法如下:
echo 'fs.inotify.max_user_instances=512' >> /etc/sysctl.conf echo 'fs.inotify.max_user_watches=262144' >> /etc/sysctl.conf sysctl -p echo '* - nofile 65535 ' >>/etc/security/limits.conf tail -1 /etc/security/limits.conf ulimit -SHn 65535 ulimit -n