Use system fs.max-files as limits instead of hard-coded value
This commit is contained in:
parent
28c67257e3
commit
9ce52c51f1
4 changed files with 23 additions and 1 deletions
|
|
@ -288,7 +288,12 @@ func (n NGINXController) OnUpdate(cmap *api.ConfigMap, ingressCfg ingress.Config
|
|||
cfg.ServerNameHashMaxSize = serverNameHashMaxSize
|
||||
}
|
||||
|
||||
// the limit of open files is per worker process
|
||||
// and we leave some room to avoid consuming all the FDs available
|
||||
maxOpenFiles := (sysctlFSFileMax() / cfg.WorkerProcesses) - 1024
|
||||
|
||||
return n.t.Write(config.TemplateConfig{
|
||||
MaxOpenFiles: maxOpenFiles,
|
||||
BacklogSize: sysctlSomaxconn(),
|
||||
Backends: ingressCfg.Backends,
|
||||
PassthroughBackends: ingressCfg.PassthroughBackends,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue