Timeout when sending over 16k of data with UTF-8 characters

Igor Sysoev igor at sysoev.ru
Tue Nov 1 06:21:12 UTC 2011


On Tue, Nov 01, 2011 at 01:00:25AM -0400, Bryan McLellan wrote:
> I'm experiencing an issue where nginx and having a difficult time
> determining the cause. It is timing out on an HTTPS PUT (to an HTTP
> backend) when content length is greater than 16384 (per
> $content_length) and it contains UTF-8 characters. The connection
> hangs and I get a 408 returned by nginx after 60 seconds. When I make
> the same call directly to the backend, it succeeds. Removing the UTF-8
> characters or reducing the seize to 16384 or below will both allow the
> request to succeed through nginx.
> 
> client_body_buffer_size is defaulting to 8k, and using
> $request_body_file I've determined that it isn't the use of a
> temporary file triggering the error. Are there any other configuration
> values that default to 16k?
> 
> My current nginx configuration:
> nginx: nginx version: nginx/1.0.5
> nginx: built by gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
> nginx: TLS SNI support enabled
> nginx: configure arguments: --conf-path=/etc/nginx
> --prefix=/srv/nginx/1.0.5 --with-http_ssl_module
> --with-http_stub_status_module --add-module=../nginx-x-rid-header
> --with-ld-opt=-luuid
> 
> I also tried 1.1.6 to see if its UTF-8 patch would help, to no avail:
> nginx: nginx version: nginx/1.1.6
> nginx: built by gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
> nginx: TLS SNI support enabled
> nginx: configure arguments: --conf-path=/etc/nginx
> --prefix=/tmp/nginx-1.1.6 --with-http_ssl_module
> --with-http_stub_status_module --add-module=../nginx-x-rid-header
> --with-ld-opt=-luuid
> 
> Successful PUT:
> 
> $status 200
> $request_time 0.943
> $body_bytes_sent 16384
> $upstream_status 200
> $upstream_response_time 0.216
> $request_length 17330
> $content_length 16384
> $request_body_file /srv/nginx/1.0.5/client_body_temp/0000000249
> 
> Failing PUT:
> $status 408
> $request_time 60.911
> $body_bytes_sent -
> $upstream_status -
> $upstream_response_time -
> $request_length 17330
> $content_length 16385
> $request_body_file /srv/nginx/1.0.5/client_body_temp/0000000250
> 
> Ideas?
> Bryan

Could you create debug log:
http://nginx.org/en/docs/debugging_log.html

What does this module do ?
--add-module=../nginx-x-rid-header


-- 
Igor Sysoev



More information about the nginx mailing list