Docker错误:打开文件过多 [英] Docker error: too many open files

查看:130
本文介绍了Docker错误:打开文件过多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

创建容器时收到该错误消息。

I got that error message when creating container.

Error response from daemon: too many open files

但是我找不到有关该错误的任何信息。
(我看到 https://github.com/docker/libcontainer/issues/211 ,但问题不完全相同。)
是否有人知道?

But I couldn't find any information about that error. (I saw https://github.com/docker/libcontainer/issues/211, but that was not the same problem of it.) Is there anyone who knows about it?

谢谢。

推荐答案

打开文件的默认数量限制为1024。您可以通过两种方式增加它:

Default limit of number of open files is 1024. You can increase it in two ways:


  1. 使用-ulimit 参数运行容器:

docker run --ulimit nofile=5000:5000 <image-tag>


  • 使用-特权模式并执行 ulimit -n 5000

    您可以找到更多信息这里

    这篇关于Docker错误:打开文件过多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆