Docker Ignores limits.conf (trying to solve “too many open files” error)

前端 未结 3 1917
梦毁少年i
梦毁少年i 2021-02-01 06:11

I\'m running a web server that is handling many thousands of concurrent web socket connections. For this to be possible, on Debian linux (my base image is google/debian:wheezy,

3条回答
  •  感动是毒
    2021-02-01 06:50

    You can pass the limit as argument while running the container. That way you don't have to modify host's limits and give too much power to the container. Here is how:

    docker run --ulimit nofile=5000:5000 
    

提交回复
热议问题