502 Bad gateway error


Hello! I’m experiencing the 502 Bad gateway error with a uWSGI Flask app. I’ve tried all of the suggestions but I’m still getting a 502:

Set PORT env var 5070
Confirmed service build succeeded
Confirmed server is running

Are there any other reasons 502s would be returned?

I don’t use any reverse proxies

This is app.ini
module = wsgi:app
http-socket =
master = true
processes = 1
threads = 2
listen = 2048
buffer-size = 32768
die-on-term = true

This is wsgi.py:
from app import app
if name == “main”:

This is main func in app.py
if name == ‘main’:

a 502 can occur if your service isn’t expose an HTTP port - I suggest getting in touch directly and we can assist you,


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.