upstream prematurely closed connection while reading response header from upstream

sosogh sosogh at mail.com
Tue Sep 13 08:30:11 UTC 2016


Hi list

My topology is :

client  --->  nginx 1.6.2 (port 80)  ---> nginx 0.7.69 with mogilefs module (port 2080)  ---> mogilefs .

I want to upload a 8G file to mogilefs , the uploading URL is 
http://dfs.myclouds.com/upload/glance_prod_env/d29a0a4a-7888-487e-91b5-57e9bbf351e7
There are errors , I have enabled debuging in both nginx instances , but seems that they are not detailed enough.


nginx 1.6.2
======

config
-------

server {
    listen       80;
    listen       8081;
    server_name  dfs.myclouds.com;

    charset utf-8;
    ssi on;
    access_log  /data2/log/nginx/dfs-1.6.2.access.log main;
    error_log  /data2/log/nginx/dfs-1.6.2-debug.log debug;

    client_max_body_size 30g;

    send_timeout 1800;
    keepalive_timeout 1800;
    proxy_read_timeout 1800;
    proxy_send_timeout 1800;
    proxy_connect_timeout 1800;

    location /upload/ {
        expires -1;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        proxy_set_header Host  $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_read_timeout    3600;
        proxy_send_timeout    3600;
        proxy_pass http://127.0.0.1:2080;
    }
}

 debug log
 -------------

2016/09/13 15:57:14 [warn] 20096#0: *6140596434 a client request body is buffered to a temporary file /usr/local/nginx-1.6.2/client_body_temp/0001956429, client: 10.21.176.4, server: dfs.myclouds.com, request: "PUT /upload/glance_prod_env/d29a0a4a-7888-487e-91b5-57e9bbf351e7 HTTP/1.1", host: "dfs.myclouds.com"

2016/09/13 16:00:17 [error] 20096#0: *6140596434 upstream prematurely closed connection while reading response header from upstream, client: 10.21.176.4, server: dfs.myclouds.com, request: "PUT /upload/glance_prod_env/d29a0a4a-7888-487e-91b5-57e9bbf351e7 HTTP/1.1", upstream: "http://127.0.0.1:2080/upload/glance_prod_env/d29a0a4a-7888-487e-91b5-57e9bbf351e7", host: "dfs.myclouds.com"


nginx 0.7.69
=========

config
------

server {
    listen       2080;
    server_name  dfs.myclouds.com;
    charset utf-8;
    ssi on;
    access_log  /data2/log/nginx/dfs2.access.log main;
    error_log  /data2/log/nginx/error2.log debug;
    client_max_body_size 30g;
    send_timeout 1800;
    keepalive_timeout 1800;
    proxy_read_timeout 1800;
    proxy_send_timeout 1800;
    proxy_connect_timeout 1800;

    location /upload/ {
        mogilefs_tracker 127.0.0.1:7001;
        mogilefs_domain mycloudsdfs;
        mogilefs_methods PUT DELETE;
        mogilefs_pass {
            proxy_pass $mogilefs_path;
            proxy_hide_header Content-Type;
            proxy_buffering off;
        }
    }

        client_body_temp_path /data/nginx-0.7.69-client_body_temp;

        mogilefs_tracker 127.0.0.1:7001;
        mogilefs_domain mycloudsdfs;
        mogilefs_methods PUT DELETE;

        mogilefs_pass {
            proxy_pass $mogilefs_path;
            proxy_hide_header Content-Type;
            proxy_buffering off;
        }
    }
}

debug log
------------

2016/09/13 15:58:43 [warn] 8786#0: *3629426 a client request body is buffered to a temporary file /data/nginx-0.7.69-client_body_temp/0000007407, client: 127.0.0.1, server: dfs.myclouds.com, request: "PUT /upload/glance_prod_env/d29a0a4a-7888-487e-91b5-57e9bbf351e7 HTTP/1.1", host: "dfs.myclouds.com"



My question is that :
How can I find out what cause this problem  "upstream prematurely closed connection while reading response header from upstream".

Thank you !




sosogh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20160913/c7d54b1b/attachment.html>


More information about the nginx mailing list