Loading

Docker中使用systemctl命令时报Too many open files错误

分析:

可能是 inotify 数量限制了,修改后服务可以正常启动

解决方法:

vim /etc/sysctl.conf
fs.inotify.max_user_instances=512
fs.inotify.max_user_watches=262144

cat >> /etc/sysctl.conf << "EOF" fs.file-max=9000000 fs.inotify.max_user_instances = 1000000 fs.inotify.max_user_watches = 1000000 EOF

参考:https://blog.csdn.net/Bobsweetie/article/details/111688878
https://www.xmmup.com/dockerzhongshiyongsystemctlminglingshibaotoo-many-open-filescuowu.html

生效
sysctl -p

posted @ 2022-12-08 15:45  就学45分钟  阅读(273)  评论(0编辑  收藏  举报