Welcome! Log In Create A New Profile

Advanced

Re: Static files bad loading time

May 07, 2015 02:30PM
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.

Regards.
Shahzaib



On Thu, May 7, 2015 at 10:56 PM, grigory <nginx-forum@nginx.us> wrote:

> Hi Francis,
>
> > Can you tell from nginx logs whether the slowness is due to
> > slow-read-from-disk, or slow-write-to-client, or something else?
>
> Could you please tell me how to check this out?
> My nginx logs do not contain this sort of information.
>
> > Can you find any pattern in the requests which respond more slowly than
> > you want? Certain browsers, certain times of day, anything like that?
>
> Unfortunately, I didn't find any pattern. It's just sometimes loads in 2
> seconds and in another time -- in 10-15 seconds. I mean same 300KB image
> within a couple of refreshes in a browser. I've tested the problem on
> different browsers and different times of day -- no luck.
>
> > If you make the request from the machine itself, so network issues should
> > be minor, does it still show sometimes being slow?
>
> When I make request from machine itself, the image loads pretty fast.
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,258372,258730#msg-258730
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Static files bad loading time

grigory April 25, 2015 02:01PM

Re: Static files bad loading time

grigory April 25, 2015 02:05PM

Re: Static files bad loading time

Francis Daly April 25, 2015 06:40PM

Re: Static files bad loading time

grigory April 26, 2015 06:11AM

Re: Static files bad loading time

grigory April 27, 2015 11:59AM

Re: Static files bad loading time

Francis Daly April 30, 2015 01:16PM

Re: Static files bad loading time

grigory May 07, 2015 01:56PM

Re: Static files bad loading time

shahzaib1232 May 07, 2015 02:30PM

Re: Static files bad loading time

Valentin V. Bartenev May 08, 2015 07:44AM

Re: Static files bad loading time

shahzaib1232 May 08, 2015 09:08AM

Re: Static files bad loading time

Valentin V. Bartenev May 08, 2015 09:20AM

Re: Static files bad loading time

shahzaib1232 May 08, 2015 10:46AM

Re: Static files bad loading time

Francis Daly May 27, 2015 05:56PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 232
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready