From b4f1b7c0f5f1cb3436529f9f655491540e0eca9d Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Tue, 12 Jul 2016 00:40:45 -0400 Subject: [PATCH] Show warning in case of low number of connections --- controllers/nginx/nginx/utils.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/nginx/nginx/utils.go b/controllers/nginx/nginx/utils.go index a4e49f737..15970ea51 100644 --- a/controllers/nginx/nginx/utils.go +++ b/controllers/nginx/nginx/utils.go @@ -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 }