The maximum number of open file descriptors should be maxOpenFiles. (#2031)

This commit is contained in:
Guang Ya Liu 2018-02-03 13:05:01 +08:00 committed by Manuel Alejandro de Brito Fontes
parent 42076e8ed0
commit e34afc0fa4

View file

@ -513,7 +513,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
wp = 1 wp = 1
} }
maxOpenFiles := (sysctlFSFileMax() / wp) - 1024 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 { if maxOpenFiles < 1024 {
// this means the value of RLIMIT_NOFILE is too low. // this means the value of RLIMIT_NOFILE is too low.
maxOpenFiles = 1024 maxOpenFiles = 1024