Skip to content

Commit

Permalink
Show warning in case of low number of connections
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Jul 12, 2016
1 parent a34124b commit b4f1b7c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/nginx/nginx/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit b4f1b7c

Please sign in to comment.