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

前端 未结 3 1853
梦毁少年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

    I was able to mitgiate this issue with the following configuration :

    I used ubuntu 14.04 linux for the docker machine and the host machine.

    On the host machine You need to :

    • update the /etc/security/limits.conf to include :* - nofile 64000
    • add to your /etc/sysctl.conf : fs.file-max = 64000
    • restart sysctl : sudo sysctl -p

提交回复
热议问题