From: Willy Tarreau Date: Sat, 8 Jul 2006 15:28:09 +0000 (+0200) Subject: [MEDIUM] now upon startup, haproxy will warn about missing timeouts. X-Git-Tag: v1.3.1~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2738a1494177b3fdf816113c909a68a3467efcc7;p=thirdparty%2Fhaproxy.git [MEDIUM] now upon startup, haproxy will warn about missing timeouts. Too many problem reports were caused by missing timeouts. While there has never been any default value since version 1.0, having no timeout is abnormal in networked environments, and will lead to various problems such as CLOSE_WAIT sockets accumulating and nasty things like this. For this reason, it's better to annoy the users until they fix their configs than letting them run buggy configurations. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index bd345b216b..091f6d98f4 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -1873,6 +1873,15 @@ int readcfgfile(char *file) } } + if ((curproxy->mode == PR_MODE_TCP || curproxy->mode == PR_MODE_HTTP) && + (!curproxy->clitimeout || !curproxy->contimeout || !curproxy->srvtimeout)) { + Warning("parsing %s : missing timeouts for listener '%s'.\n" + " | While not properly invalid, you will certainly encounter various problems\n" + " | with such a configuration. To fix this, please ensure that all following\n" + " | values are set to a non-zero value: clitimeout, contimeout, srvtimeout.\n", + file, curproxy->id); + } + /* first, we will invert the servers list order */ newsrv = NULL; while (curproxy->srv) {