worker_connections should be less than worker_rlimit_nofile
This commit is contained in:
parent
d4d25f6fb4
commit
638f965a8f
1 changed files with 4 additions and 2 deletions
|
@ -22,6 +22,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"math"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
@ -538,8 +539,9 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg.MaxWorkerConnections == 0 {
|
if cfg.MaxWorkerConnections == 0 {
|
||||||
klog.V(3).Infof("Adjusting MaxWorkerConnections variable to %d", cfg.MaxWorkerOpenFiles)
|
maxWorkerConnections := int(math.Ceil(float64(cfg.MaxWorkerOpenFiles * 3.0 / 4)))
|
||||||
cfg.MaxWorkerConnections = cfg.MaxWorkerOpenFiles
|
klog.V(3).Infof("Adjusting MaxWorkerConnections variable to %d", maxWorkerConnections)
|
||||||
|
cfg.MaxWorkerConnections = maxWorkerConnections
|
||||||
}
|
}
|
||||||
|
|
||||||
setHeaders := map[string]string{}
|
setHeaders := map[string]string{}
|
||||||
|
|
Loading…
Reference in a new issue