Docker Redis container getting WARNING: /proc/sys/net/core/somaxconn in a user defined network

Hey guys I’m having a really hard time with this one and I need help. I need to run a Redis container on a user defined network and assign it a static ip so I have this:
docker run -v /root/test/:/data/ -p 7001:7001 --net iso_nw --ip 172.18.0.2 --name testy -d redis redis-server /data/redis.conf
This causes my Redis instance to display the TCP backlog warning:

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

  • Connect to Docker Swarm for Continuous deploy
  • Docker unable to perform login against SSO / Federation Services via Apache & Shibboleth modules
  • PHPfpm and Nginx not working in Docker with Supervisord
  • Elastic Beanstalk CLI - Not replacing instance on deploy
  • Docker compose share environment variables
  • Docker-compose connection refused from celery
  • My brain is fried trying to make this warning go away without using --net host. Can someone help me please. Thanks.

  • docker > run two nodejs scripts using gulp and nodemon
  • Mounting a directory to docker container
  • Docker compose: Multiple isolated environments on a single host with overridable volumes and ports
  • Not receiving UDP traffic on port exposed in Docker container running on Docker for Windows. How to debug?
  • Set up swarm mode Docker Swarm using Vagrant
  • Multi Docker container with PHP7 fpm and nginx
  • One Solution collect form web for “Docker Redis container getting WARNING: /proc/sys/net/core/somaxconn in a user defined network”

    I figured it out. Ok first the TCP backlog setting that I’m trying to use is invalid. The max allowed value is 65535 which is a short unsigned int, so I updated my Redis config with this value.

    Now I can run the container by loading /proc/ as a writable volume and echo the value:

    docker run -v /root/test/:/data/ -v /proc/:/wproc/ -p 7001:7001 --net iso_nw --ip 172.18.0.2 --name testy -d redis echo 65535 > /wproc/sys/net/core/somaxconn && redis-server /data/redis.conf
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.