Fix Redis warning in Windows under WSL

Viewed 682

I get the following Redis errors running under WSL using Ubuntu 18.04.

# WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
41:M 22 Oct 12:14:37.662 # Server initialized
41:M 22 Oct 12:14:37.662 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

I have only tried to fix the backlog error because no matter what I do somaxconn stays set to 128. I have tried the following:

sysctl -w net.core.somaxconn=1024
set in sysctl.conf like so net.core.somaxconn=1024
set in rf.local like so net.core.somaxconn=1024 and sysctl -w net.core.somaxconn=1024

I have restarted Redis after all of these and rebooted and tried Redis and it never seems to take the value I set despite multiple websites say it should. Any help would be appreciated.

0 Answers
Related