Static files bad loading time

shahzaib shahzaib shahzaib.cb at gmail.com
Fri May 8 13:05:51 UTC 2015


Well, reducing keepalive_timeout and increasing the values of
worker_connections resolved our issue. Following is the reference we used
to tweak nginx config :

http://blog.martinfjordvald.com/2011/04/optimizing-nginx-for-high-traffic-loads/

Thanks.
Shahzaib

On Fri, May 8, 2015 at 4:42 PM, Valentin V. Bartenev <vbart at nginx.com>
wrote:

> On Thursday 07 May 2015 23:27:44 shahzaib shahzaib wrote:
> > Hi,
> >
> >    There are some tweaks required to nginx configurations. If the same
> > image which usually takes second to response can takes upto 10-20 seconds
> > to load, the wide guess would be exceeding concurrent connections at peak
> > traffic. The directive worker_rlimit_nofile value is set much lower as
> > compare to worker_connections. Nginx uses upto 2 file descriptors per
> > connections, so i would suggest to increase worker_rlimit_nofile value to
> > 124000.
> >
> > Also, default keepalive_timeout value is 65sec due to which your current
> > nginx configuration is not optimized to serve more than 2000 concurrent
> > connections. Here's how :
> >
> > (Worker_process)4 * 32768(worker_connections) / 65(Keepalive_timeout ==
> > 2016 connections per seconds.
> >
> > So i would suggest to decrease keepalive_timeout to 5sec directive and
> > increase worker_connections to 60000.
> >
> > Also make sure to decrease timeout values.
> >
>
> The keepalive_timeout has nothing to do with the maximum number of
> concurrent connections per second.
>
>   wbr, Valentin V. Bartenev
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20150508/aeefbbdf/attachment.html>


More information about the nginx mailing list