max clients != worker processes * worker connections
zzz at zzz.org.ua
Tue Oct 11 15:39:08 UTC 2011
On 10/11/11, davidcie <nginx-forum at nginx.us> wrote:
> Can you please let me know why this setup might not be serving the
> "promised" ;-) worker_processes * worker_connections connections?
> Is it possible that new connections are not being evenly distributed to the
> two processes?
They aren't supposed to be evenly distributed. Whoever gets cpu time
first is likely to accept as many connections as possible. Unless you
have blocking or cpu intensive requests in which case it won't have
enough time to call another accept but other worker will.
And it's actually not specific to nginx. I think any non-blocking
server behaves like this.
Although you can try setting accept_mutex or something to influence this.
More information about the nginx