T
T
TrueDrago2013-08-26 21:31:29
symfony
TrueDrago, 2013-08-26 21:31:29

How long does it take to preview a picture when it is generated?

I ran into the following problem on my VPS:
I use the LiipImageBundle library to generate thumbnails for pictures, which is nothing more than a wrapper over gd.
When generating a preview for the first time, a very strange picture is obtained, as in the screenshot:
9f60da98150f5fad21603e1f1669f113.png
In fact, the picture is given in 400-600ms (with the status 201 Created ), and the rest of the time the connection just hangs, and resp. It turns out the total time to receive the file is 1 minute. Then if you request this picture, then everything is ok.
What could be the problem and where should I dig?
Now I have Nginx as a front-end server in front of apache, but I turned on redirects for any files on this domain to the backend, which had no effect.
UPD:The problem is in the status 201, if you manually set the status 200 in the code that generates the picture, then everything works out quickly!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TrueDrago, 2013-08-26
@TrueDrago

The issue was resolved by updating nginx to the latest version, which began to give Content-Length for responses with 201 status.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question