Welcome! Log In Create A New Profile

Advanced

Problem with downloading large files in nginx

Posted by rahul2k6.nitjsr 
Problem with downloading large files in nginx
April 28, 2012 12:52AM
Hi All,

I am using nginx server. On user's request, I am creating a file and providing a download link for that file. The file size is 2.1 GB. I am observing that when we click on that link, only a part of that file gets downloaded which varies at different occasions. Can you guys help me on this as I am stuck at that point. Thanks in advance.
Re: Problem with downloading large files in nginx
May 01, 2012 02:44PM
rahul2k6.nitjsr Wrote:
-------------------------------------------------------
I am running nginx/1.0.14. I have been trying to download a tar file, which is of the size 2.0 GB. But it is downloading only a part of it. The downloaded part varies on different occasions.
The output of nginx -V is as follow -

nginx version: nginx/1.0.14
built by gcc 4.1.1
TLS SNI support disabled
configure arguments: --with-ld-opt='-L /home/bws/code/firmware/current/lib' --with-cc-opt='-I /home/bws/code/firmware/current/include' --prefix=/home/bws/code/firmware/current --sbin-path=/home/bws/code/firmware/current/bin --with-perl_modules_path=/home/bws/code/firmware/current/lib/perl5 --with-http_perl_module --with-debug --conf-path=/home/product/code/config/nginx.conf --error-log- path=/mail/log/apache/error_log --http-log-path=/mail/log/apache/access_log --http-fastcgi-temp-path=/mail/tmp/fastcgi_tmp --pid-path=/var/run/nginx.pid --with-http_gzip_static_module --with-http_realip_module --with-http_ssl_module --with-ipv6 --add-module=/data/trunk/common/nginx/nginx_upload_module


Also, Below I am providing error_log corresponding to this download event ----


2012/04/29 21:55:03 [debug] 22012#0: *405 writev: 8184
2012/04/29 21:55:03 [debug] 22012#0: *405 http write filter 00000000
2012/04/29 21:55:03 [debug] 22012#0: *405 http copy filter: 0 "/cgi-mod/index.cgi?primary_tab=BASIC&secondary_tab=virus_checking"
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe write busy: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe write: out:00000000, f:0
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe read upstream: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe buf free s:0 t:1 f:0 B78D0D40, pos B78D0D40, size: 0 file: 0, size: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe buf free s:0 t:1 f:0 B78D1D48, pos B78D1D48, size: 0 file: 0, size: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe buf free s:0 t:1 f:0 B7816268, pos B7816268, size: 0 file: 0, size: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe buf free s:0 t:1 f:0 B78CFD38, pos B78CFD38, size: 0 file: 0, size: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe buf free s:0 t:1 f:0 B78D2D50, pos B78D2D50, size: 0 file: 0, size: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 event timer: 14, old: 26994105, new: 26994167
2012/04/29 21:55:03 [debug] 22012#0: *405 post event B78C2E2C
2012/04/29 21:55:03 [debug] 22012#0: *405 post event B78C9634
2012/04/29 21:55:03 [debug] 22012#0: *405 delete posted event B78C9634
2012/04/29 21:55:03 [debug] 22012#0: *405 http upstream request: "/cgi-mod/index.cgi?primary_tab=BASIC&secondary_tab=virus_checking"
2012/04/29 21:55:03 [debug] 22012#0: *405 http upstream dummy handler
2012/04/29 21:55:03 [debug] 22012#0: *405 delete posted event B78C2E2C
2012/04/29 21:55:03 [debug] 22012#0: *405 http upstream request: "/cgi-mod/index.cgi?primary_tab=BASIC&secondary_tab=virus_checking"
2012/04/29 21:55:03 [debug] 22012#0: *405 http upstream process upstream
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe read upstream: 1
2012/04/29 21:55:03 [debug] 22012#0: *405 readv: 5:4096
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe recv chain: 88
2012/04/29 21:55:03 [debug] 22012#0: *405 readv: 5:4096
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe recv chain: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe buf free s:0 t:1 f:0 B78D0D40, pos B78D0D40, size: 88 file: 0, size: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe buf free s:0 t:1 f:0 B78D1D48, pos B78D1D48, size: 0 file: 0, size: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe buf free s:0 t:1 f:0 B7816268, pos B7816268, size: 0 file: 0, size: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe buf free s:0 t:1 f:0 B78CFD38, pos B78CFD38, size: 0 file: 0, size: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe buf free s:0 t:1 f:0 B78D2D50, pos B78D2D50, size: 0 file: 0, size: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 01
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 06
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 00
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 01
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 00
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 34
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 04
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 00
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record length: 52
2012/04/29 21:55:03 [debug] 22012#0: *405 input buf #4 B78D0D48
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 01
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 06
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 00
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 01
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 00
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 00
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 00
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 00
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record length: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi closed stdout
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 01
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 03
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 00
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 01
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 00
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 08
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 00
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record byte: 00
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi record length: 8
2012/04/29 21:55:03 [debug] 22012#0: *405 http fastcgi sent end request
2012/04/29 21:55:03 [debug] 22012#0: *405 input buf B78D0D48 52
2012/04/29 21:55:03 [debug] 22012#0: *405 free: B78D1D48
2012/04/29 21:55:03 [debug] 22012#0: *405 free: B7816268
2012/04/29 21:55:03 [debug] 22012#0: *405 free: B78CFD38
2012/04/29 21:55:03 [debug] 22012#0: *405 free: B78D2D50
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe write downstream: 1
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe write downstream flush in
2012/04/29 21:55:03 [debug] 22012#0: *405 http output filter "/cgi-mod/index.cgi?primary_tab=BASIC&secondary_tab=virus_checking"
2012/04/29 21:55:03 [debug] 22012#0: *405 http copy filter: "/cgi-mod/index.cgi?primary_tab=BASIC&secondary_tab=virus_checking"
2012/04/29 21:55:03 [debug] 22012#0: *405 http postpone filter "/cgi-mod/index.cgi?primary_tab=BASIC&secondary_tab=virus_checking" B7817518
2012/04/29 21:55:03 [debug] 22012#0: *405 write new buf t:1 f:0 B78D0D40, pos B78D0D48, size: 52 file: 0, size: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 http write filter: l:0 f:0 s:52
2012/04/29 21:55:03 [debug] 22012#0: *405 http copy filter: 0 "/cgi-mod/index.cgi?primary_tab=BASIC&secondary_tab=virus_checking"
2012/04/29 21:55:03 [debug] 22012#0: *405 pipe write downstream done
2012/04/29 21:55:03 [debug] 22012#0: *405 event timer: 14, old: 26994105, new: 26994171
2012/04/29 21:55:03 [debug] 22012#0: *405 http upstream exit: 00000000
2012/04/29 21:55:03 [debug] 22012#0: *405 finalize http upstream request: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 finalize http fastcgi request
2012/04/29 21:55:03 [debug] 22012#0: *405 free rr peer 1 0
2012/04/29 21:55:03 [debug] 22012#0: *405 close http upstream connection: 14
2012/04/29 21:55:03 [debug] 22012#0: *405 event timer del: 14: 26994105
2012/04/29 21:55:03 [debug] 22012#0: *405 reusable connection: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 http upstream temp fd: -1
2012/04/29 21:55:03 [debug] 22012#0: *405 http output filter "/cgi-mod/index.cgi?primary_tab=BASIC&secondary_tab=virus_checking"
2012/04/29 21:55:03 [debug] 22012#0: *405 http copy filter: "/cgi-mod/index.cgi?primary_tab=BASIC&secondary_tab=virus_checking"
2012/04/29 21:55:03 [debug] 22012#0: *405 http postpone filter "/cgi-mod/index.cgi?primary_tab=BASIC&secondary_tab=virus_checking" BFE666A0
2012/04/29 21:55:03 [debug] 22012#0: *405 write old buf t:1 f:0 B78D0D40, pos B78D0D48, size: 52 file: 0, size: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 write new buf t:0 f:0 00000000, pos 00000000, size: 0 file: 0, size: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 http write filter: l:1 f:0 s:52
2012/04/29 21:55:03 [debug] 22012#0: *405 http write filter limit 0
2012/04/29 21:55:03 [debug] 22012#0: *405 writev: 52
2012/04/29 21:55:03 [debug] 22012#0: *405 http write filter 00000000
2012/04/29 21:55:03 [debug] 22012#0: *405 http copy filter: 0 "/cgi-mod/index.cgi?primary_tab=BASIC&secondary_tab=virus_checking"
2012/04/29 21:55:03 [debug] 22012#0: *405 http finalize request: 0, "/cgi-mod/index.cgi?primary_tab=BASIC&secondary_tab=virus_checking" a:1, c:1
2012/04/29 21:55:03 [debug] 22012#0: *405 event timer add: 12: 5000:26879171
2012/04/29 21:55:03 [debug] 22012#0: *405 http lingering close handler
2012/04/29 21:55:03 [debug] 22012#0: *405 recv: fd:12 -1 of 4096
2012/04/29 21:55:03 [debug] 22012#0: *405 recv() not ready (11: Resource temporarily unavailable)
2012/04/29 21:55:03 [debug] 22012#0: *405 lingering read: -2
2012/04/29 21:55:03 [debug] 22012#0: *405 event timer: 12, old: 26879171, new: 26879171
2012/04/29 21:55:03 [debug] 22012#0: *405 post event B78C9600
2012/04/29 21:55:03 [debug] 22012#0: *405 delete posted event B78C9600
2012/04/29 21:55:03 [debug] 22012#0: *405 http empty handler
2012/04/29 21:55:03 [debug] 22012#0: *405 post event B78C2DF8
2012/04/29 21:55:03 [debug] 22012#0: *405 post event B78C9600
2012/04/29 21:55:03 [debug] 22012#0: *405 delete posted event B78C9600
2012/04/29 21:55:03 [debug] 22012#0: *405 http empty handler
2012/04/29 21:55:03 [debug] 22012#0: *405 delete posted event B78C2DF8
2012/04/29 21:55:03 [debug] 22012#0: *405 http lingering close handler
2012/04/29 21:55:03 [debug] 22012#0: *405 recv: fd:12 0 of 4096
2012/04/29 21:55:03 [debug] 22012#0: *405 lingering read: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 http request count:1 blk:0
2012/04/29 21:55:03 [debug] 22012#0: *405 http close request
2012/04/29 21:55:03 [debug] 22012#0: *405 http log handler
2012/04/29 21:55:03 [debug] 22012#0: *405 free: 00000000
2012/04/29 21:55:03 [debug] 22012#0: *405 free: 00000000
2012/04/29 21:55:03 [debug] 22012#0: *405 free: B78D0D40
2012/04/29 21:55:03 [debug] 22012#0: *405 free: 00000000
2012/04/29 21:55:03 [debug] 22012#0: *405 free: 00000000
2012/04/29 21:55:03 [debug] 22012#0: *405 free: B7815250, unused: 4
2012/04/29 21:55:03 [debug] 22012#0: *405 free: B7817270, unused: 2898
2012/04/29 21:55:03 [debug] 22012#0: *405 close http connection: 12
2012/04/29 21:55:03 [debug] 22012#0: *405 event timer del: 12: 26879171
2012/04/29 21:55:03 [debug] 22012#0: *405 reusable connection: 0
2012/04/29 21:55:03 [debug] 22012#0: *405 free: B786EB78
2012/04/29 21:55:03 [debug] 22012#0: *405 free: B780F120
2012/04/29 21:55:03 [debug] 22012#0: *405 free: B78AD9C0, unused: 56
Re: Problem with downloading large files in nginx
May 22, 2012 05:37AM
setting 'fastcgi_max_temp_file_size 0;' in nginx.conf worked.... For more info about this nginx directive, visit -

http://wiki.nginx.org/HttpFcgiModule#fastcgi_max_temp_file_size

Thanks.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 132
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