Can't increase receive buffer size on AIO WSL2 with Ubuntu host?

I’ve already added this to Ubuntu:

sysctl -w net.core.rmem_max=2500000

I keep getting this message on the mastercontainer:

{"level":"info","ts":1686227111.158495,"msg":"failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See for details."}

I don’t know how to fix this.


Hi, see Caddy warning `failed to sufficiently increase receive buffer size` · nextcloud/all-in-one · Discussion #1970 · GitHub

1 Like

Not sure if I found that page. I appreciate the quick help. I will try this tonight.

1 Like

This just isn’t working, for some reason. I have followed the stackoverflow method and added:

kernelCommandLine = "sysctl.vm.max_map_count=2500000"

to my .wslconfig file.

I can verify that it is applying sysctl values correctly because I run this in the Ubuntu shell:

> sysctl vm.max_map_count
vm.max_map_count = 2500000

I rebooted the machine, and even deleted/ re-made the master-container. It always displays:

{"level":"info","ts":1686227111.158495,"msg":"failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See for details."}

Do you possibly have more ideas on the issue?

Holy crap. I’m patting myself on the back. Finally deduced a problem with a solution that doesn’t seem to be mentioned anywhere.

I read through the long post on stackoverflow, to see if there was any other insight. The author mentions another method of adding

command="sysctl -w vm.max_map_count=262144"

to the wsl.conf file in your WSL host, then reboot. This caused Docker Desktop to completely fail. I had to remove the edit to get DD working again. He also went on a tangent about systemd and how to enable it. Lo And Behold it apparently was enabled by default. So, I tried your command:

echo "net.core.rmem_max = 2500000" | sudo tee /etc/sysctl.d/nextcloud-aio-buffer-increase.conf

which did nothing. It was ignored, just like editing wsl.conf and .wslconfig. I deleted the file that was created, then I then realized I could add a line directly to /etc/sysctl.conf; since he says the ‘normal’ methods would now work. At the bottom of the file I added:

net.core.rmem_max = 2500000

which finally cleared the error…Whew! :sweat_smile:

How exactl did you edit this file? Where is it located? I am asking in order to improve the docs…

Hey @szaimen, I was off last week, performing repairs around the house. I forced myself to have a ‘No-Tech’ week.

I will look back over what I did and report back to you, so you can update docs. I’d say this evening, or tomorrow. As of right now, I mostly forgot what I did, but my notes here should refresh my memory.

1 Like