Timeout serving large requests

BrindleFly nginx-forum at nginx.us
Wed Feb 13 17:11:16 UTC 2013

Here is nginx version (note: although it is compiled with passenger, I have
not turned on the passenger directive in nginx.conf):

nginx version: nginx/1.2.6
built by gcc 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --with-http_ssl_module
--with-http_gzip_static_module --with-cc-opt=-Wno-error

Here is nginx.conf:

user nobody;
worker_processes  1;
pid /etc/nginx/nginx.pid;

events {
  worker_connections  1024;
  accept_mutex off;

include conf.d/*.conf;

http {
  upstream app_server {
    server fail_timeout=0;
  server {
    listen 80 default;
    server_name myapp.com;
    root /var/www/myapp/public;

    try_files $uri/index.html $uri.html $uri @app;

    location @app {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

      proxy_set_header Host $http_host;

      proxy_redirect off;

      proxy_pass http://app_server;


  # Try extreme timeouts to see if issue will reproduce                     
  client_header_timeout 600s;
  client_body_timeout 600s;
  keepalive_timeout 600s;
  proxy_read_timeout 600s;
  proxy_send_timeout 600s;
  lingering_timeout 600s;
  lingering_time 600s;
  send_timeout 600s;

  error_log  /var/log/nginx/error.log;
  access_log /var/log/nginx/access.log;

  include mime.types;
  default_type application/octet-stream;

  sendfile on;
  tcp_nopush off;
  gzip on;
  gzip_http_version 1.0;
  gzip_proxied any;
  gzip_min_length 500;
  gzip_disable "MSIE [1-6]\.";
  gzip_types text/plain text/html text/xml text/css
             text/javascript application/x-javascript

  include sites.d/*.conf;

  include blockips.conf;

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,236201,236210#msg-236210

More information about the nginx mailing list