Docker错误:太多打开的文件
创build容器时,我收到了这个错误信息。
Error response from daemon: too many open files
但是我找不到有关这个错误的任何信息。 (我看到https://github.com/docker/libcontainer/issues/211 ,但这不是同样的问题。)有谁知道这件事?
谢谢。
打开文件的数量默认限制为1024.您可以通过两种方式增加它:
-
使用
--ulimit
参数运行容器:docker run --ulimit nofile=5000:5000 <image-tag>
-
使用
--privileged
模式运行容器并执行ulimit -n 5000
。
你可以在这里find更多的信息。