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
(Bart) #7

I noticed the following warning in my rebuild log:

# WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.

I was doing some reading and found some suggestions to raise this value. Should I? Will this help performance of our platform?

(Bart) #8

Thanks for moving my post to the right topic guys, it was kinda hard to find as the keyword appears in many search results :vulcan_salute:

So there’s no apparent advantage to tweaking this value? That’s one thing off my todo list then!