Welcome! Log In Create A New Profile

Advanced

Using Nginx with chunking

All files from this thread

File Name File Size   Posted by Date  
nginx_error_location.log 654.1 KB open | download Arun John (arujohn) 08/12/2015 Read message
Arun John (arujohn)
August 12, 2015 05:32AM
Hello,

I have nginx configured to send files in chunks to remote clients. The clients will contact the server to send it in chunks of 1 MB each. I am using nginx version 1.8.0


[root@ph-rdu-external-download-01 sbin]# ./nginx -V

nginx version: nginx/1.8.0

built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)

built with OpenSSL 1.0.1e-fips 11 Feb 2013

TLS SNI support enabled

configure arguments: --user=nginx --group=nginx --prefix=/usr/local/nginx --lock-path=/var/lock/subsys/nginx --with-ld-opt=-Wl,-rpath,/usr/lib64 --with-debug --add-module=/root/integ/ngx_devel_kit-master/ --add-module=/root/integ/lua-nginx-module-0.9.15 --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --without-http_autoindex_module --without-http_fastcgi_module --with-http_ssl_module --without-http_geo_module --without-http_empty_gif_module --without-http_ssi_module --without-http_userid_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-http_uwsgi_module --without-http_scgi_module --with-http_realip_module --with-http_gzip_static_module --with-http_stub_status_module --with-ipv6

Currently I am running into an issue, where if the last chunk size is very small (few bytes), the server doesn’t seem to the send the chunk correctly because of which the clients would re-try again for the same chunk. For some reason it is not able to send the last chunk. I have attached the debug logs to the thread. If you see the logs the last three writes seem to be for the same chunk of size 6672 bytes

However if the last chunk size relatively large, then download succeeds without any issues. The issue is seen when the last chunk size is very small.

My current nginx configuration is as follows



http {

# Logging format

log_format main '$remote_addr - $remote_user [$time_local] ' '"$request_length" "$request_time" '

'"$request" $status $bytes_sent ' '"$body_bytes_sent" "$bytes_sent" ';

default_type application/octet-stream;

include mime.types;

keepalive_timeout 300 300;

keepalive_requests 8000;

charset utf-8;

source_charset utf-8;

# Check if it makes errors.

ignore_invalid_headers off;

recursive_error_pages on;

sendfile on;

server_tokens off;

tcp_nodelay on;

tcp_nopush off;

}

Regards,
Arun







_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Attachments:
open | download - nginx_error_location.log (654.1 KB)
Subject Author Posted

Using Nginx with chunking Attachments

Arun John (arujohn) August 12, 2015 05:32AM

Re: Using Nginx with chunking

Maxim Dounin August 12, 2015 08:54AM

Re: Using Nginx with chunking

Arun John (arujohn) August 12, 2015 09:06AM

Re: Using Nginx with chunking

Reinis Rozitis August 12, 2015 09:44AM

Re: Using Nginx with chunking

Maxim Dounin August 12, 2015 10:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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