Skip to content
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

Receive buffer size cannot be increased within Docker containers #3801

Open
pirate opened this issue May 5, 2023 · 8 comments
Open

Receive buffer size cannot be increased within Docker containers #3801

pirate opened this issue May 5, 2023 · 8 comments

Comments

@pirate
Copy link

pirate commented May 5, 2023

Hi, I'm trying to use caddy (which uses quic-go v0.34.0) in Docker, and am encountering this error.

failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details.

However, the Docker Desktop VM on macOS (and maybe other OSs?) has neither the kern.ipc.maxsockbuf nor net.core.rmem_max sysctl settings settings available.

~/$ docker run --rm -it --privileged ubuntu /bin/bash

$ sysctl -w net.core.rmem_max=2097152
sysctl: cannot stat /proc/sys/net/core/rmem_max: No such file or directory

$ sysctl -w kern.ipc.maxsockbuf=3014656
sysctl: cannot stat /proc/sys/kern/ipc/maxsockbuf: No such file or directory

Is there any other way to increase the QUIC receive buffer, or get rid of this error message within docker? Thanks!

Versions:

  • host OS: macOS 13.2.1 (arm64 M1)
  • Docker Desktop: 23.0.5, build bc4487a
  • quic-go version: 0.34.0 (from caddyserver/caddy/go.mod)

Related:

@marten-seemann
Copy link
Member

Unfortunately I'm not familiar enough with Docker networking to solve this. We have a similar report in #3418, is this a duplicate?

@pirate
Copy link
Author

pirate commented May 5, 2023

Ah whoops, that is a duplicate. Not sure why I missed it when I searched earlier!

Unfortunately I don't think the EC2-specific resolution in #3418 works for Docker Desktop. Maybe someone else knows how to set the equivalent sysctl keys in macOS Docker Desktop's VM?
My attempt with --privileged didn't work :/

@marten-seemann
Copy link
Member

@pirate Can you check if #3804 fixed the problem?

@pirate
Copy link
Author

pirate commented May 9, 2023

Is it ok if I wait for the next caddy release which includes this update? I don't know enough about go-quic to test it in isolation.

Feel free to close the issue if needed and I can reopen it if I see the error keep happening.

@marten-seemann
Copy link
Member

Right, we introduced a bunch of breaking changes since the last release.

Is it ok if I wait for the next caddy release which includes this update?

Sure!

@mosajjal
Copy link

is it possible to suppress this warning or bring it back to the main application to deal with the message? in some scenarios, stderr logging might not be good enough.

@dinvlad
Copy link

dinvlad commented Aug 11, 2023

@pirate have you or anyone else been able to address this in Docker Desktop or on a non-ECS host (and without --net host or --cap-add NET_ADMIN)?

@arashpayan
Copy link
Contributor

is it possible to suppress this warning

If you'd like to suppress it, you can set the environment variable QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING to true

os.Setenv("QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING", "true")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants