# NginxHttpUploadProgressModule never response "done" state for large files

**URL:** <https://www.ruby-forum.com/t/nginxhttpuploadprogressmodule-never-response-done-state-for-large-files/188733>\
**Category:** NGINX\
**Created:** [May 17, 2010, 2:22pm UTC](https://www.ruby-forum.com/t/nginxhttpuploadprogressmodule-never-response-done-state-for-large-files/188733 "2010-05-17T14:22:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![murphy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5fc32e/32.png) [@murphy](https://www.ruby-forum.com/u/murphy)\
**Post date:** [May 17, 2010, 2:22pm UTC](https://www.ruby-forum.com/t/nginxhttpuploadprogressmodule-never-response-done-state-for-large-files/188733/1 "2010-05-17T14:22:37Z")

</div>

When uploading large files (\>150Mb) , progress bar shows normal till  
100% value, but in the end of upload process he does not send “done”  
response, and looks like this :

…  
new Object({ ‘state’ : ‘uploading’, ‘received’ : 244431206, ‘size’ :  
244431206 })  
new Object({ ‘state’ : ‘uploading’, ‘received’ : 244431206, ‘size’ :  
244431206 })  
new Object({ ‘state’ : ‘uploading’, ‘received’ : 244431206, ‘size’ :  
244431206 })  
new Object({ ‘state’ : ‘uploading’, ‘received’ : 244431206, ‘size’ :  
244431206 })  
new Object({ ‘state’ : ‘uploading’, ‘received’ : 244431206, ‘size’ :  
244431206 })  
…

and after few seconds (~30s) “504 gateway time out” error is  
showing.

The host config looks like the one in the UploadProgressModule example,  
other vars  
nginx.conf vars:  
client\_max\_body\_size 900m;  
keepalive\_timeout 70 30;  
send\_timeout 30s;

php.ini vars:  
post\_max\_size = 300M  
upload\_max\_filesize = 300M  
max\_execution\_filesize = 30  
max\_input\_time = 90

![](http://linkme.ufanet.ru/images/4de85ee1a58e66e134bdcdcc08cd28cf.jpg)

Any ideas ? Thanks.

Posted at Nginx Forum:

> **[NginxHttpUploadProgressModule never response "done" state for large files](https://forum.nginx.org/read.php?2,87421,87421#msg-87421)**
>
> When uploading large files (\>150Mb) , progress bar shows normal till 100% value, but in the end of upload process he does not send "done" response, and looks like this : .... new Object({ 'state' : 'uploading', 'received' : 244431206,...

---

<div class="post-metadata">

**Author:** ![murphy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5fc32e/32.png) [@murphy](https://www.ruby-forum.com/u/murphy)\
**Post date:** [May 21, 2010, 12:09pm UTC](https://www.ruby-forum.com/t/nginxhttpuploadprogressmodule-never-response-done-state-for-large-files/188733/2 "2010-05-21T12:09:09Z")

</div>

Hi,

On Mon, 2010-05-17 at 08:21 -0400, murphy wrote:

> 244431206 })  
> new Object({ ‘state’ : ‘uploading’, ‘received’ : 244431206, ‘size’ :  
> 244431206 })  
> new Object({ ‘state’ : ‘uploading’, ‘received’ : 244431206, ‘size’ :  
> 244431206 })  
> …
> 
> and after few seconds (~30s) “504 gateway time out” error is  
> showing.

That’s strange. Can you please compile nginx with --with-debug, then  
activate the debug log and upload agin the same file.  
Then send me privately the compressed log file so that I can analyze it.

One possibility is that your upstream is not slurping the file quickly  
enough and then nginx timeouts. The upload progress module will report  
the upload done only when the upstream finally gets it (which is usually  
fast because on LAN or localhost).

What do you use as upstream?

> max\_execution\_filesize = 30  
> max\_input\_time = 90  
> –  
> Brice F.  
> My Blog: [http://www.masterzen.fr/](http://www.masterzen.fr/)
