<div dir="ltr">Hi Valentine,<div><br><br>>><span style="font-size:12.8000001907349px">What's really important is the connections that nginx cannot close.  The active ones.</span></div><span style="font-size:12.8000001907349px">How long the connection is active depends on the request processing time.<br><br><br></span><div>  Thanks for pointing that to me. Nginx serving around 800Mb of mp4 files but the problem is we're unable to track request processing time. Could you please let us know some method/command to find how long the connection remains active during request being  process ?<br><br>Though, one thing is for sure, increasing worker_connections resolved our problem. Current connections setting is quite high but working well to entertain large number of connections with 900Mbps outward traffic. Here's our workers and connections settings:<br><br><br>worker_processors 48;<br>worker_connections 102400;<br><br>Regards.</div><div>Shahzaib</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 8, 2015 at 6:05 PM, Valentin V. Bartenev <span dir="ltr"><<a href="mailto:vbart@nginx.com" target="_blank">vbart@nginx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thursday 07 May 2015 18:38:23 shahzaib shahzaib wrote:<br>
> Hi,<br>
><br>
>   It looks like we made the false calculation based on entertaining<br>
> concurrent connections per seconds and worker_connections limit was set to<br>
> be very low. I've increased this limit to 16000 and issue looks to be<br>
> fixed. Here's the mechanism i used to calculate concurrent connections/sec:<br>
><br>
>  worker_processes * worker_connections / keepalive_timeout == concurrent<br>
> connections per second<br>
><br>
> Concurrent connections on our server is around 15K . Based on this i used<br>
> the following values :<br>
><br>
>  48 * 16000 / 15 == 51200/sec<br>
><br>
> Can somebody point to me if the calculation method is false ?<br>
><br>
</span>[..]<br>
<br>
It's false.<br>
<br>
The keepalive_timeout has nothing to do with the concurrent connections per second.<br>
In fact, nginx can close an idle connection at any time when it reaches the limit<br>
of worker_connections.<br>
<br>
What's really important is the connections that nginx cannot close.  The active ones.<br>
How long the connection is active depends on the request processing time.<br>
<br>
The approximate calculation looks like this:<br>
<br>
 worker_processes * worker_connections * K / average $request_time<br>
<br>
where K is the average number of connections per request (for example, if you do proxy<br>
pass, then nginx needs additional connection to your backend).<br>
<br>
  wbr, Valentin V. Bartenev<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br></div>