New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis 5.0.5: WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128 #6123
Comments
Hi, have you try to If works, you can add Regards, |
Please give some days to accomplish this, I deleted the Ubuntu (Cannonical) Windows integration and moved to VirtualBox with Ubuntu. Thanks for the feedback |
In my case, this solves the problem. Thanks @bubulemaster |
I only can do edit somaxconn value with this command: |
I am also getting these redis related errors on a manual cluster setup and found these useful instructions for updating maximum open files, socket max connections, memory overcommit, and transparent huge pages for redis for older, or bare metal linux(ubuntu 1404 in my case) os and beyond: |
I've tried this. The first command did not produce any error, but modifying lsb_release -a Any other suggestions? |
@LaOwlLol I assume you're also using Windows System for Linux, is that correct? If so, please note that there's a big difference between WSL1 which only provides a user-space environment and WSL2 which is a fully virtualized environment running a Linux kernel. Since WSL1 is not a real Linux environment most of the kernel-related tunings simply don't work. |
I am agree with @yossigo ... I had the same situation about wrong behaviour with Mysql, install Ubuntu on Windows (through the latter itself) makes no available to have neither a true installation nor functional execution for some software, in my case for MySQL and Redis. So, if you can use VirtualBox with Ubuntu do it, or have your real installation. All the features and software of the OS itself are available to let run any server in peace and totally functional. In this case for MySQL, I didn't test Redis with the settings suggested. |
@manueljordan Please note that WSL 2.0 is actually a VM (like VirtualBox) and may solve these issues as well. |
@yossigo - understood, please remember I had this issue on 2019, so I moved to VirtualBox directly since then. If WSL 2.0 does what you did indicate, sounds great. But to be honest I prefer have Ubuntu 100% available with all its features. |
I'm actually running the Ubuntu VM on a FreeNAS (FreeBSD derivative now called TrueNas) machine. I run Redis in a docker container on that VM. I apologize if this is veering off topic, but I'm not super familiar with kernel virtualization or system administration. I read that these settings, somaxconn and transparent_hugepage before that, had to be modified on the host and not the container. I assume 'the host' referred to the VM; host to the container. I was not thinking about the FreeNAS (the host's host XD) kernel. When I set THP to disabled a restart of the VM was not required. I just brought the container down and back up (with docker-compose). This did not appear to be the case for somaxconn, and as I initially posted modifying /etc/sysctl.conf did not make the setting change stick after reboot. Also on rebooting the VM I lost the modification to THP. docker redis issue #55 and the related issues had a number of suggestion for setting these values on system startup. Always being cautious about modifying the boot config files, I was waiting for a weekly snapshot before modifying my systemd. There was also a suggestion some where to set the values (THP enable and defrag) in /etc/rc.local. Apologies for the long post. Does bhyve have the same user-space limitations when kernel tuning (should modifying at the VM level work or will it have to be done at freeNAS kernel)? Would systemd or rc.local be an alternative place to modify somaxconn? I appreciate all the help. I run this Redis instance for a hobby project so apologies once again for reviving an some what stale/resolved issue. However it would be nice to find an automatic set and forget solution for my project. |
@LaOwlLol THP is a global kernel parameter, so modifying it from a container (if the container is privileged to do so) affects the entire system. If you don't persist it in I'm closing this issue as I believe it already answers the original question. |
Make sure you don't have a phantom Redis instance running on the port. $ lsof -i -P -n | grep LISTEN if you do, just grab it's pid and tell it to take a hike: # SIGTERM for politeness
$ kill <pid> |
I have
windows 10 home
, where is installedUbuntu
I have installed
Redis 5.0.5
(it mostly withmake
andmake install
)When I startup the server with
redis-server
it shows some warnings.I have removed one about
overcommit_memory
But about:
I have read these two links:
Thus both indicate do the following:
/etc
directoryrc.local
file,sudo vim rc.local
sysctl -w net.core.somaxconn=65535
content and saveI can confirm through
Well in a secondary terminal I execute
redis-cli shutdown
and in the primary terminal execute againredis-server
Problem the same warning appears, What is missing?
Note I have the same situation even after to execute
sudo chmod +x rc.local
The text was updated successfully, but these errors were encountered: