Timeout serving large requests

Anatoly Mikhailov anatoly at sonru.com
Wed Feb 13 17:17:00 UTC 2013


Try to build it clean without passenger module, then update config with:

http {
    client_max_body_size      25m;
    client_body_buffer_size   128k;
    client_body_temp_path     /tmp/client_body_temp;
    …
}

Anatoly


On Feb 13, 2013, at 5:11 PM, "BrindleFly" <nginx-forum at nginx.us> wrote:

> 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
> --add-module=/usr/local/rvm/gems/ruby-1.9.3-p286/gems/passenger-3.0.18/ext/nginx
> 
> 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 127.0.0.1:8080 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/comma-separated-values
>             text/javascript application/x-javascript
>             application/atom+xml;
> 
>  include sites.d/*.conf;
> 
>  include blockips.conf;
> }
> 
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,236201,236210#msg-236210
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list