maxconn 1 in nginx

Grzegorz Nosek grzegorz.nosek at
Thu Oct 9 19:48:55 MSD 2008

On Thu, Oct 09, 2008 at 04:28:37PM +0200, Benjamin wrote:
> upstream_fair (with weight-mode=peak) will only limit the number of
> > requests, causing Nginx to return 502 errors. It could be hacked to
> > never return a hard error (I think), so if that's the only difference
> > and the OP is willing to do some testing, I can implement that.
> I do not know the weight-mode option. But it's the same principle. Instead
> of returning an error, haproxy created a queue of requests.


@Igor: Will keeping pc->tries above zero at all times achieve this
effect without eating lots of CPU? (pc is the ngx_peer_connection_t*
passed to ->peer.get())

@Michał: If Igor confirms, would you have a way to test the patched

Best regards,
 Grzegorz Nosek

More information about the nginx mailing list