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

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

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

BTW - this is uWSGI HTTP

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

Any ideas? I just want to run a uWSGI app for more than 60 seconds?

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

It sounds like uwsgi setting problem. Prematurely closed connection
means
Nginx is not expecting that.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs