On Wed, Jul 03, 2019 at 01:30:52PM +0000, William Dauchy wrote:
> On Wed, Jun 26, 2019 at 11:29:47AM +1000, Igor Cicimov wrote:
> > Those maxconn values are per frontend so if your backend is referenced by
> > two frontends you might end up with a limit of 2 x maxconn on the backend.
> > Hence it is recommended to set maxconn per server too to protect from
> > situation like this. So read about maxconn and even fullconn in the server
> > config and tuning guide for more details.
> 
> thanks for the precision. I however later discovered in the code:
> 
> ha_warning("Proxy %s stopped (FE: %lld conns, BE: %lld conns).\n",
>         p->id, p->fe_counters.cum_conn, p->be_counters.cum_conn);
> 
> which means this is simply a cumulative counter displayed in the log.

Indeed. It was added into 1.4 (and backported into 1.3) with this commit :

  commit 1104614b57419dbe6f0407d8ce6bf6910d9aeba7
  Author: Willy Tarreau <w...@1wt.eu>
  Date:   Thu Mar 4 23:07:28 2010 +0100

    [MINOR] report total number of processed connections when stopping a proxy
    
    It's sometimes convenient to know if a proxy has processed any connection
    at all when stopping it. Since a soft restart causes the "Proxy stopped"
    message to be logged for each proxy, let's add the number of connections
    so that it's possible afterwards to check whether a proxy had received
    any connection.

I might have had a good reason for doing it like this back then because
9 years later I find it stupid! Or at least confusing. I too was pretty
sure that it was the number of active conns. After giving it some thoughts,
it wouldn't make sense that it reports the number of active conns since
the proxy only stops when there are no more. Still the message could be
improved, like "FE: %lld cumulated conns" or something like this.

Willy

Reply via email to