How do you set net.core.somaxconn in the docker container?


(Caleb Boylan) #1

How do you set net.core.somaxconn in the docker container so that Redis doesn’t complain that somaxconn is less than 511? Using sysctl doesnt work inside of the container and setting it on the host doesn’t affect the container. Perhaps the launcher script should know to run docker with the --sysctl net.core.somaxconn=512 option?


(Matt Palmer) #2

(Stefano Maffulli) #3

What’s that supposed to mean: that ignoring the warning will blow up your site? Or that the warning is a joke?

PS Sarcasm doesn’t transfer over TCP/IP :slight_smile:


(Matt Palmer) #4

Can we ever truly know what anything means, really?

What I meant was that you can ignore the warning, it’s just Redis being finicky.


(Discourse.PRO) #5

I have found the solution:

./launcher rebuild <container> --docker-args "--sysctl net.core.somaxconn=65535"

«docker run» → «Configure namespaced kernel parameters (sysctls) at runtime»


Nginx, nginx, and docker