<HTML>
<HEAD>
<TITLE>Timeout issues</TITLE>
</HEAD>
<BODY>
<FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi All,<BR>
<BR>
Ok I am having issues with NGINX and it timing out. My scenario is that I am using NGINX as a web server front end for my application. I have two folder being served as alias’s for static content and one location doing a proxy_pass to a java server. <BR>
<BR>
My issue is that on one of the request that goes through the proxy_pass to the local java web server will time out through nginx within 10 minutes. The timeout is a browser timeout. It takes 11-12 minutes to load the page without nginx, so I need nginx to not kill the session until that time has passed. I have tried every timeout setting imaginable that I could find and I still get a browser timeout at 10 minutes. Note this is an SSL connection, the test without nginx in the way was also an SSL connection.<BR>
<BR>
Below are my configs, note all the timeout options have been slowly added over time and lots of testing.....they are not my wanted scenario but I am trying to figure out how this is done.<BR>
<BR>
<B>NGINX.conf<BR>
</B><BR>
user www-data;<BR>
worker_processes  4;<BR>
<BR>
error_log  /var/log/nginx/error.log;<BR>
pid        /var/run/nginx.pid;<BR>
<BR>
events {<BR>
    worker_connections  1024;<BR>
    # multi_accept on;<BR>
}<BR>
<BR>
http {<BR>
    include       /etc/nginx/mime.types;<BR>
<BR>
    access_log  /var/log/nginx/access.log;<BR>
<BR>
    sendfile        on;<BR>
    #tcp_nopush     on;<BR>
<BR>
    #keepalive_timeout  0;<BR>
    keepalive_timeout  900 900;<BR>
 client_body_timeout      900;<BR>
  client_header_timeout    900;<BR>
  send_timeout             900;<BR>
<BR>
<BR>
    tcp_nodelay        on;<BR>
<BR>
    gzip  on;<BR>
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";<BR>
    gzip_types text/plain text/html text/css text/javascript image/png image/x-icon application/x-javascript application/xml image/gif;<BR>
    <BR>
    ssl_session_cache    shared:SSL:100k;<BR>
    ssl_session_timeout  20m;<BR>
<BR>
<BR>
    include /etc/nginx/conf.d/*.conf;<BR>
    include /etc/nginx/sites-enabled/*;<BR>
}<BR>
<BR>
<B>Site Conf<BR>
<BR>
</B>server {<BR>
        listen       80;<BR>
        server_name  localhost;<BR>
<BR>
        #charset koi8-r;<BR>
<BR>
        access_log  /var/log/nginx/80-app.access.log;<BR>
        error_log  /var/log/nginx/80-app.error.log;<BR>
<BR>
        location / {<BR>
            rewrite ^/(.*)$ https://$host/$1 redirect;<BR>
        }<BR>
<BR>
        error_page  404              /404.html;<BR>
<BR>
        # redirect server error pages to the static page /50x.html<BR>
        #<BR>
        error_page   500 502 503 504  /50x.html;<BR>
        location = /50x.html {<BR>
            root   html;<BR>
        }<BR>
}<BR>
server {        <BR>
        listen       443;<BR>
        server_name  localhost; <BR>
<BR>
<BR>
        access_log  /var/log/nginx/app.access.log;<BR>
        error_log  /var/log/nginx/app.error.log;<BR>
<BR>
        ssl                  on;<BR>
        ssl_certificate      /usr/local/oc/install/server.com.crt;<BR>
        ssl_certificate_key  /usr/local/oc/install/server.key;<BR>
<BR>
#        fail_timeout 3600s;<BR>
    keepalive_timeout  900 900;<BR>
 client_body_timeout      900;<BR>
  client_header_timeout    900;<BR>
  send_timeout             900;<BR>
        # directly serve the static files in the `images` directory<BR>
        location ~ ^/APP/includes/(.*)$ {<BR>
            # add future expiry date to force caching of the file on the client<BR>
            expires max;<BR>
            add_header Cache-Control "public";<BR>
            alias /usr/local/tomcat/webapps/APP/includes/$1;<BR>
        }<BR>
<BR>
        location ~ ^/APP/images/(.*)$ {<BR>
            # add future expiry date to force caching of the file on the client <BR>
            expires max;<BR>
            add_header Cache-Control "public";<BR>
            alias /usr/local/tomcat/webapps/APP/images/$1;<BR>
        }<BR>
        # pass all other requests to Tomcat<BR>
        location /APP {<BR>
            proxy_read_timeout 3600s;<BR>
            proxy_connect_timeout 3600s;<BR>
            proxy_send_timeout 3600s;<BR>
<BR>
            proxy_pass <a href="http://127.0.0.1:8080/APP;">http://127.0.0.1:8080/APP;</a><BR>
            proxy_set_header Host $host;<BR>
            proxy_set_header X-Real-IP $remote_addr;<BR>
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<BR>
        }<BR>
}<BR>
<BR>
<BR>
Any help is greatly appreciated. I wouldn’t even mind if it is possible to disable timeout all together just as a test.<BR>
<BR>
Thanks,<BR>
Shaun<BR>
-- <BR>
<BR>
</SPAN></FONT></FONT>
</BODY>
</HTML>