Static files bad loading time

Francis Daly francis at
Wed May 27 21:55:21 UTC 2015

On Thu, May 07, 2015 at 01:56:02PM -0400, grigory wrote:

Hi there,

> > 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.

I'm actually not sure how to go about that. Possibly there will be
details in the debug log? But you do not want to run the debug log on
a busy system that only sporadically shows the problem.

Possibly a lighter way of trying to identify a pattern is to include
$request_time in you normal access_log.

Then when you see the slowness, you can identify the request in the logs,
and see is there any pattern that way -- does it always and only happen
when there are more than 100 other concurrent requests; or at that
start of a minute when something else on the system is busy starting;
or something that is common to these requests and not to others.

(Or maybe the common feature is not something that nginx can see.)

> > 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.

If that remains true when you make the request a hundred times, that
suggests that the problem is outside of nginx's control, in the system
networking or (more likely) the network outside the nginx server.

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list