apache - ulimit : error setting limit - Operation not permitted - (using apachectl in container on ECS)

标签 apache amazon-ecs

我在日志中看到此错误:

/usr/sbin/apachectl: 99: ulimit: error setting limit (Operation not permitted) /usr/sbin/apachectl: 99: ulimit: error setting limit (Operation not permitted)

Setting ulimit failed. See README.Debian for more information.



首先,有人知道为什么 apache/apachectl 试图调用 ulimit?
其次,假设它是合法的,我怎么能让这个操作起作用?我以 root 用户身份调用 apachectl,所以我不明白为什么这会成为一个问题。尽管默认情况下 apachectl 可能以与 root 不同的用户身份运行?

最佳答案

看起来您必须像这样在 ECS 配置中设置 ulimits:
https://www.infoworld.com/article/3067303/how-to-configuring-linux-usage-limits-with-docker-and-aws-ecs.html

"containerDefinitions": [
    {
...
      "ulimits": [
        {
          "softLimit": 2048,
          "hardLimit": 2048,
          "name": "nofile"
        }
      ]
...
    }
  ]

关于apache - ulimit : error setting limit - Operation not permitted - (using apachectl in container on ECS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57486473/

相关文章:

php - 如何将我的 WAMP 放到网上供其他人访问?

apache - 为什么这会导致我的网站重定向到 secure.secure.*root domain*.com?

java - POI 单元格颜色和宽度

java - 使用户无法访问网页

aws-cloudformation - AWS ecs使用cloudwatch计划任务

php - Web 服务器上默认为 PHP 扩展

amazon-web-services - 将单个 Codebuild 项目部署到多个 ECS 容器

amazon-web-services - 如果负载均衡器具有有效的 CA 证书,我可以在 AWS 实例上使用自签名证书吗?

aws-cli - AWS CLI 返回未知选项 : awsvpcConfiguration

amazon-web-services - 使用ECS/EC2实例 self 描述区域