-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Increase nf_conntrack_tcp_timeout_close_wait #4276
Comments
In a quick spot check, I saw that this is already configured to 3600 on GKE and 60 on AKS. |
It seems that in order to do this, we need to set |
I deployed this today into a test environment using an initContainer per the suggestion of @grampelberg. I will have feedback in the next few days if this worked to address the issues that we are seeing.
I shelled into a pod with this and did this:
|
For us, we did not have to increase nf_conntrack_tcp_timeout_close_wait for all containers. We only needed to increase nf_conntrack_tcp_timeout_close_wait value for Nginx ingress controller only to fix the issue, so maybe making this configurable as an annotation can limit the security concern. |
Depends on linkerd/linkerd2-proxy-init#10 Fixes #4276 We add a `--close-wait-timeout` inject flag which configures the proxy-init container to run with `privileged: true` and to set `nf_conntrack_tcp_timeout_close_wait`. Signed-off-by: Alex Leong <alex@buoyant.io>
What problem are you trying to solve?
By default,
nf_conntrack_tcp_timeout_close_wait
is set to 60 seconds. Any requests taking longer than that get lost by the kernel causing 502 gateway errors to applications.kube-proxy
bumped this up to 3600 seconds for its rules (see kubernetes/kubernetes#32551).How should the problem be solved?
It is not possible to modify this via. the pod spec as it is marked "unsafe" in most k8s installations. However, as it is part of the network namespace, you can set it in init containers and have it persist for the life of the session. We should do this inside the
proxy-init
container and as part of setup for CNI.The text was updated successfully, but these errors were encountered: