Hi Andrew,

On Mon, Oct 19, 2015 at 02:23:39PM -0500, Andrew Hayworth wrote:
> In another thread "Dynamically change server maxconn possible?",
> someone raised the possibility of setting a per-server maxconn via the
> stats socket. I believe the below patch implements this functionality.
> 
> I'd appreciate any feedback, since I'm not really familiar with this
> part of the code. However, I've tested it by curling slow endpoints
> (the nginx echo_sleep module, specifically) and can confirm that NOSRV
> is returned appropriately according to whatever maxconn settings are
> set via the socket.

Thanks. Normally you also need to try to dequeue pending connections
when changing the value, because if you increase the limit, you need
to open the door for new connections. After changing the value, you
normally need something like this :

                if (may_dequeue_tasks(srv, srv->proxy))
                        process_srv_queue(srv);

Regards,
Willy


Reply via email to