在GCE Docker下运行Couchbase并获取最大文件数量的错误
当我在GCE的Docker容器中运行Couchbase服务器时,使用ncolomer / couchbase映像,我收到这个错误:
The maximum number of open files for the couchbase user is set too low. It must be at least 10240. Normally this can be increased by adding the following lines to /etc/security/limits.conf: couchbase soft nofile <value> couchbase hard nofile <value> Where <value> is greater than 10240.
ncolomer / couchbase中的文档build议更新/etc/init/docker.conf
并添加limit nofile 262144
,但我不确定在GCE下使用Docker时甚至是可用的。
我看到几个选项:
- 在Dockerfile中,按照couchbase错误的build议运行一个脚本来修改
/etc/security/limits.conf
。 - 在Dockerfile中调用
ulimit -n 64000
有什么build议么?
ulimit的问题是,限制是由docker主机进程的限制所限制的。 这与已知的#4717 (和更小的程序#1916 )Docker问题有关。
据我所知,你提到的两个选项不应该工作,因为它只会对subprocess(即容器)设置限制。 从那里,我看到别无select,只能在主机上设置正确的ulimit,然后再尝试增加容器。
文件化的程序应该正常工作,直到你有可能应用它。 我不太了解GCE平台,但是如果您具有对您的实例的根访问权限,则只需将更改应用到/etc/init/docker.conf
文件,重新启动Docker服务并启动Couchbase容器。
- 在Docker容器里推荐GCE服务帐号authentication?
- 如何在kubernetes集群中通过SSH连接到Docker容器?
- 为什么docker工看到容器正在达到rss限制?
- TERM环境variables未在Google Compute Engine上使用Docker进行设置
- 在Google计算引擎上使用Neo4j的默认主机
- R – install.packages不能在计算引擎上的docker上运行
- 使用java jdbc套接字工厂从本地docker容器内连接到cloudsql实例
- 将Google永久磁盘附加到Cloud SDK Docker容器
- Ubuntu上托pipe虚拟机使用自定义运行时