Forums

My Django app returns '502 Bad Gateway'

Hi, I am getting the error, Error code: 502-backend when I am trying to launch my webpage's dashboard. Is there any fix to this? In logs, I don't see any errors and sometimes it loads correctly the dashboard, but just for a few seconds, almost of the time I'm getting the error 502.

Are you using Django >= 3.0 with Python 3.7? If so, I think it might be happening because of a bug in Python 3.7.0, which is the point release of 3.7 that your account is configured to use. We can change it to 3.7.5, which does not have that bug, by changing your account's system image to our latest one. But one word of warning first -- because of the changes to the point releases of Python, any virtualenvs you have might break -- and if you're not using virtualenvs, the pre-installed Python modules will be upgraded so that might break any code you have that relies on the old installed versions.

If you're happy for us to switch you over despite that, then let us know.