nginx as remote proxy - limit number of concurrent connections?

Antonio P.P. Almeida appa at
Mon Apr 2 09:54:04 UTC 2012

> I'm using nginx as a remote proxy server in front of a bunch of Tomcat
> instances, and occasionally I'm running into a situation where all
> available threads are used up in the Tomcat instances, which causes
> various problems. Rather than trying to deal with these problems in that
> layer, I was wondering about preventing the situation from arising by
> limiting the number of concurrent connections to the upstream servers in
> nginx. I'm not entirely sure how to do this, but I have no doubt it's
> doable. Suggestions, please!

Try this:

with the weight_mode=peak option.


More information about the nginx mailing list