Docker container buffer size

Hello everyone,

My current environment is as following:
Mac Mini M1 2020 running macOS Monterey (12.0.1) and docker running version 4.0.1 (build 68347).

I have a blazor server application running with keycloak as authentication, my current problem is that the header response is “too large”. How do I increase the buffer size on the container itself?

Current scenario:
User 1 with 10 roles, no problem.
User 2 with 15 roles, the connection just closes.

I had a simular issue on AKS (Azure Kubernetes Service), but that was an easy fix, just needed to increase the buffers in nginx ingress configmap.

I have tried to increase the default buffers on the host device itself, but no luck. I have also tried docker run --sysctl net.core.rmem_max=8388608, but it failes with:

docker: Error response from daemon: OCI runtime create failed: conatiner_linux.go:380: starting container process caused: process_linux.go:545: container init caused: write sysctl key net.core.rmem_max: open /proc/sys/net/core/rmem_max: no such file or directory: unknown.
ERRO[0000] error waiting for container: context canceled

Is there a way to increase the /proc/sys/net/ipv4/tcp_rmem and /proc/sys/net/ipv4/tcp_wmem and would that solve the issue?

All help would be appreciated, thanks.


It seems that docker container doesn’t have the parameter rmem_max. Maybe it uses the buffer of the host?