Avoid negative values configuring the max number of open files
This commit is contained in:
parent
752672866b
commit
cf82f694de
1 changed files with 4 additions and 0 deletions
|
@ -370,6 +370,10 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) ([]byte, er
|
|||
wp = 1
|
||||
}
|
||||
maxOpenFiles := (sysctlFSFileMax() / wp) - 1024
|
||||
if maxOpenFiles < 0 {
|
||||
// this means the value of RLIMIT_NOFILE is too low.
|
||||
maxOpenFiles = 1024
|
||||
}
|
||||
|
||||
setHeaders := map[string]string{}
|
||||
if cfg.ProxySetHeaders != "" {
|
||||
|
|
Loading…
Reference in a new issue