-
Notifications
You must be signed in to change notification settings - Fork 8.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
Wrong number of open file calculated #2157
Comments
Actually, I think it was done right since #177 but #2050 broke the "open files" limit determination. There was a discussion about it in the issue #2048 that led to PR #2050. The example given in that issue is a very specific use-cases. The calculation only makes sense if the Ingress is alone on the Kubernetes node and if no lower limit is set at a different level Where the limit for the number of open files should be set is a tricky discussion as seen in kubernetes/kubernetes#3595. But having the Nginx Ingress relying on the global kernel parameter |
I just hit this issue. Any plans to revert #2050? Maybe add a configuration flag to opt into using |
@gyliu513 please check this |
No effect on
and logs as:
when I exec to pods:
|
@shenshouer: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The current 0.11 version changed the way the calculation of maximum open files is done. #2050
Now the value is coming from the kernel parameter
fs.file-max
and this is probably not what we want. The value is shared among all containers if you run many multiple containers only a small fraction of the "open files" might be available to a single container. It make no sense to calculate the open files limit per nginx worker based on this parameter as if nginx would be only one running on the node.Furthermore each container can have a specific limit that is capped by the kernel limit. If you set a limit for the "open files" in the Docker daemon that is way lower than the kernel parameter, the nginx ingress tries to setup a value [worker_rlimit_nofile] outside the pod's limits and causes an error in the log:
2018/02/28 08:37:57 [alert] 2415#2415: setrlimit(RLIMIT_NOFILE, 201374) failed (1: Operation not permitted)
When running ingress in non priviledged mode it is also not possible to change the kernel value anyway when calling
'sysctl -w fs.file-max=10000
in the initContainer.What would make sense is to use instead the value coming from the userlimit as this is the real limit for the process open files.
The text was updated successfully, but these errors were encountered: