NginX and Magento very strange problem (?!)
mdounin at mdounin.ru
Mon Mar 4 11:44:37 UTC 2013
On Sun, Mar 03, 2013 at 10:30:17AM -0500, omolinete wrote:
> Hello All,
> This is my first post on the forum, so thank you very much in advance for
> your attention on my topic. Hope anyone could help me :)
> The problem we are getting with NginX and Magento, is relating to the
> download process of files such as PDF, which are in this case invoices.
> Magento seems to work flawlessly under NginX, except when we try to view
> from the server any PDF file through the Magento backend, or when we try to
> save the same file on our local disk.
> The tricky point is that we don't get any problem when we try to download a
> previously uploaded PDF file to the server using the "scp" command, and
> accessing to this file using the direct URL.
> The problem appears when we try to download the PDF file from the Magento's
> backend; NginX contact our browser but does not start the transfer/download
> after you perform a restart of the NginX's service.
> I have recorded a little video of 3:27 minutes from my desktop, where you
> will see by yourself what is the issue we have with NginX. Here is the URL:
> http://www.misspepa.com/capturedmovie.ogv . Please, note that there's no
> audio for the video.
> We are really convinced that the problem is at the NginX side and not on
> Magento side, because as you will see on the video, when we restart the
> NginX service the transfer which still says "Starting" (when it is really
> frozen) is rapidly accomplished with success.
> If I do not restart the NginX service, the download transfer process of such
> files will become stalled for a indefinitely period of time with no
> ... And last but not last, the logs of NginX didn't report any error. So,
> for that reason I decided to post my issue to the forum, in order to get
> some help on this subject.
>From the symptoms described/shown I would suppose Content-Length
is reported incorrectly by a backend, which makes browser to
assume there will be more data and to wait for it. Restart of the
nginx forces close of the connection and convinces browser there
is nothing to wait for.
It's just a guess though, you should use debug log and/or tcpdump
to analize what actually goes on. See here for some debugging
More information about the nginx