<div dir="ltr">Well, reducing keepalive_timeout and increasing the values of worker_connections resolved our issue. Following is the reference we used to tweak nginx config :<br><br><a href="http://blog.martinfjordvald.com/2011/04/optimizing-nginx-for-high-traffic-loads/">http://blog.martinfjordvald.com/2011/04/optimizing-nginx-for-high-traffic-loads/</a><br><br>Thanks.<br>Shahzaib</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 8, 2015 at 4:42 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 23:27:44 shahzaib shahzaib wrote:<br>
> Hi,<br>
><br>
> There are some tweaks required to nginx configurations. If the same<br>
> image which usually takes second to response can takes upto 10-20 seconds<br>
> to load, the wide guess would be exceeding concurrent connections at peak<br>
> traffic. The directive worker_rlimit_nofile value is set much lower as<br>
> compare to worker_connections. Nginx uses upto 2 file descriptors per<br>
> connections, so i would suggest to increase worker_rlimit_nofile value to<br>
> 124000.<br>
><br>
> Also, default keepalive_timeout value is 65sec due to which your current<br>
> nginx configuration is not optimized to serve more than 2000 concurrent<br>
> connections. Here's how :<br>
><br>
> (Worker_process)4 * 32768(worker_connections) / 65(Keepalive_timeout ==<br>
> 2016 connections per seconds.<br>
><br>
> So i would suggest to decrease keepalive_timeout to 5sec directive and<br>
> increase worker_connections to 60000.<br>
><br>
> Also make sure to decrease timeout values.<br>
><br>
<br>
</span>The keepalive_timeout has nothing to do with the maximum number of<br>
concurrent connections per second.<br>
<br>
wbr, Valentin V. Bartenev<br>
<div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br></div>