From 4920d70fa0faf41679631e2d2b18ee0fc4b8955e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyril=20Bont=C3=A9?= Date: Fri, 15 Apr 2016 07:58:43 +0200 Subject: [PATCH] BUG/MINOR: fix maxaccept computation according to the frontend process range commit 7c0ffd23 is only considering the explicit use of the "process" keyword on the listeners. But at this step, if it's not defined in the configuration, the listener bind_proc mask is set to 0. As a result, the code will compute the maxaccept value based on only 1 process, which is not always true. For example : global nbproc 4 frontend test bind-process 1-2 bind :80 Here, the maxaccept value for the "test" frontend was set to the global tune.maxaccept value (default to 64), whereas it should consider 2 processes will accept connections. As of the documentation, the value should be divided by twice the number of processes the listener is bound to. To fix this, we can consider that if no mask is set to the listener, we take the frontend mask. This is not critical but it can introduce unfairness distribution of the incoming connections across the processes. It should be backported to the same branches as commit 7c0ffd23 (1.6 and 1.5 were in the scope). --- src/cfgparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cfgparse.c b/src/cfgparse.c index c3b29d4d0..2400559d9 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -8741,7 +8741,7 @@ out_uri_auth_compat: int nbproc; nbproc = my_popcountl(curproxy->bind_proc & - listener->bind_conf->bind_proc & + (listener->bind_conf->bind_proc ? listener->bind_conf->bind_proc : curproxy->bind_proc) & nbits(global.nbproc)); if (!nbproc) /* no intersection between listener and frontend */