Resolving 502 Bad Gateway Errors
Last updated: February 9, 2026
If you are experiencing a 502 Bad Gateway error when accessing your application, this typically indicates one of two common issues:
Your application is currently restarting
Your application is listening on the wrong port
During Application Restart
If your application is in the process of restarting, the 502 error is temporary and should resolve itself once the restart is complete. Wait a few minutes and try accessing your application again.
Wrong Port Configuration
If the error persists, verify that your application is configured to listen on the correct port. Make sure the port specified in your application matches the port configured in your Porter settings.
For detailed debugging steps and additional information about 502 errors, refer to our debugging documentation.