当请求增加时,Mesos 会终止容器

当请求增加时,Mesos 会终止容器

我在 Google Cloud Engine(Ubuntu 14.04)上的 Mesos(0.21)和 Marathon(0.7.6)上部署了 Docker 容器。
我使用 JMeter 测试在 Marathon 上运行的 REST 服务。当并发请求少于 10 时,它工作正常,但当并发请求超过 50 时,容器被杀死,Mesos 启动另一个容器。我增加了 RAM 和 CPU,但这种情况仍然发生。
这是 /var/log/mesos/ 中的日志

E0116 09:33:31.554816 19298 slave.cpp:2344] Failed to update resources for container 10e47946-4c54-4d64-9276-0ce94af31d44 of executor dev_service.2e25332d-964f-11e4-9004-42010af05efe running task dev_service.2e25332d-964f-11e4-9004-42010af05efe on status update for terminal task, destroying container: Failed to determine cgroup for the 'cpu' subsystem: Failed to read /proc/612/cgroup: Failed to open file '/proc/612/cgroup': No such file or directory

答案1

參考文獻:https://issues.apache.org/jira/browse/MESOS-1837

MESOS_isolation='cgroups/cpu,cgroups/mem'
MESOS_cgroups_root='system.slice/mesos-slave.service'
MESOS_cgroups_hierarchy=/sys/fs/cgroup

它将解决你的问题。

相关内容