[Django]-Nginx gunicorn 502 bad gateway: upstream prematurely closed connection while reading response header from upstream

7👍

If the problem were in nginx timeout it would give you 504 error. 502 error means that this error could happen due to timeout in process behind nginx, gunicorn in your case I guess. Try to launch it with -t 3000 param (to match your nginx conf).

Leave a comment