Welcome! Log In Create A New Profile

Advanced

uWSGI - upstream prematurely closed connection while reading response header from upstream

June 24, 2015 09:04PM
Hi,

I have a script which runs for 70 seconds. I have NGINX connecting to it via uWSGI.

I have set "uwsgi_read_timeout 90;". However, NGINX drops the connection exactly at 60 seconds -

"upstream prematurely closed connection while reading response header from upstream"

My script continues to run and completes after 70 seconds, however my browser connection has died before then (502 error).

The option "uwsgi_read_timeout" does its job for anything less than 60 seconds (ie uwsgi_read_timeout 30;) and terminates with a 504 error as expected.

I don't quite understand what is catching the 502 bad gateway error even though I have instructed nginx to permit a uwsgi read timeout of 90

Other -

I also have set "keepalive_timeout 300 300;"

Any ideas as to the cause? I see numerous posts on the internet advising to use "uwsgi_read_timeout"

Thanks
Subject Author Posted

uWSGI - upstream prematurely closed connection while reading response header from upstream

ajjH6 June 24, 2015 09:04PM

Re: uWSGI - upstream prematurely closed connection while reading response header from upstream

ajjH6 June 24, 2015 09:07PM

Re: uWSGI - upstream prematurely closed connection while reading response header from upstream

ajjH6 July 03, 2015 12:45AM

Re: uWSGI - upstream prematurely closed connection while reading response header from upstream

ryd994 July 03, 2015 01:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 84
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 214 on March 20, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready