The maximum number of open file descriptors should be maxOpenFiles.

This commit is contained in:
Guangya Liu 2018-02-03 12:26:36 +08:00
parent 42076e8ed0
commit 2bae12c1b4

View file

@ -513,7 +513,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
wp = 1
}
maxOpenFiles := (sysctlFSFileMax() / wp) - 1024
glog.V(3).Infof("maximum number of open file descriptors : %v", sysctlFSFileMax())
glog.V(3).Infof("maximum number of open file descriptors : %v", maxOpenFiles)
if maxOpenFiles < 1024 {
// this means the value of RLIMIT_NOFILE is too low.
maxOpenFiles = 1024