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).
Source:stackexchange.com