Show warning in case of low number of connections
This commit is contained in:
parent
a34124be9d
commit
b4f1b7c0f5
1 changed files with 2 additions and 0 deletions
|
@ -224,9 +224,11 @@ func diff(b1, b2 []byte) (data []byte, err error) {
|
|||
|
||||
// sysctlSomaxconn returns the value of net.core.somaxconn, i.e.
|
||||
// maximum number of connections that can be queued for acceptance
|
||||
// http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
|
||||
func sysctlSomaxconn() int {
|
||||
maxConns, err := sysctl.GetSysctl("net.core.somaxconn")
|
||||
if err != nil || maxConns < 512 {
|
||||
glog.Warningf("system net.core.somaxconn=%v. Using NGINX default (511)", maxConns)
|
||||
return 511
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue