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

Set min value of maxOpenFiles as 64000 #2055

Closed
gyliu513 opened this issue Feb 9, 2018 · 2 comments
Closed

Set min value of maxOpenFiles as 64000 #2055

gyliu513 opened this issue Feb 9, 2018 · 2 comments

Comments

@gyliu513
Copy link
Contributor

gyliu513 commented Feb 9, 2018

Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.):

What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.):


Is this a BUG REPORT or FEATURE REQUEST? (choose one):

We are now setting the default value of maxOpenFiles as 1024 which is a bit small, as it will sometimes cause ingress cannot start.

Even though we can set fs.file-max to a large value, but sometimes setting a too big value will cause nginx report error setrlimit(RLIMIT_NOFILE, 98976) failed (1: Operation not permitted).

So how about setting the minimum value as 64000 and this can fulfill most cases. If customer have large fs.file-max, they can enlarge ulimit -n to increase the value of rlimit.

Comments? @aledbf

NGINX Ingress controller version:
0.9.0

Kubernetes version (use kubectl version):

Environment:

  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

What happened:

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know:

@aledbf
Copy link
Member

aledbf commented Feb 11, 2018

@gyliu513 we cannot do that because if you set a higher value than the configured for the pod the controller will never start.

@aledbf aledbf closed this as completed Feb 11, 2018
@chestack
Copy link

chestack commented Sep 9, 2019

my env: 128 cpu cores

nginx.conf:

worker_processes: 128;
worker_rlimit_nofile: 1024;
events {
    worker_connections  16384;
}

nginx error: accept4() failed (24 too many open files)

default value minimum 1024 is not enough for 128 worker_processes

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

3 participants