Refresh net.core.somaxcomm (or any sysctl property) for docker containers

后端 未结 6 2193
囚心锁ツ
囚心锁ツ 2020-12-08 01:36

I am trying to change net.core.somaxconn for docker container to be able to have larger queue of requests for my web application.

On OS, outside docker,

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-08 02:00

    Just figured out how to solve this, now Elastic Beanstalk supports running a privileged containers and you just need to add the "privileged": "true" to your Dockerrun.aws.json as the following sample (please take a look at the container-1):

    {
      "AWSEBDockerrunVersion": 2,
      "containerDefinitions": [{
        "name": "container-0",
        "essential": "false",
        "image": "ubuntu",
        "memory": "512"
      }, {
        "name": "container-1",
        "essential": "false",
        "image": "ubuntu",
        "memory": "512",
        "privileged": "true"
      }]
    }
    

    Please note that I duplicated this answer from another thread.

提交回复
热议问题