Render 502 Bad Gateway Error

Share
Ongoing Web services Updated November 14, 2026Based on 4 user reportsHow we research

Quick answer

A 502 on Render usually means no healthy instance is serving: failed deploy, wrong host/port, failing health checks, or worker timeouts. Check the logs first.

Most likely fix: Check the deploy and logs

How to fix it

Try these in order — the most common fix is first.

  1. 1. Check the deploy and logs

    1. Confirm the latest deploy is Live
    2. Read runtime logs around the time of the error
    Did this fix it?
  2. 2. Fix host, port and health check

    1. Bind to 0.0.0.0:$PORT
    2. Make the health check path return 2xx or 3xx quickly
    Did this fix it?
  3. 3. Fix intermittent 502 on Node

    1. Increase keepAliveTimeout and headersTimeout above 120 seconds on your HTTP server
    Did this fix it?
  4. 4. Fix worker timeouts on Python

    1. Raise the Gunicorn --timeout value or speed up slow requests
    Did this fix it?

Symptoms

Visiting the service returns 502 Bad Gateway, sometimes only intermittently.

Why it happens

  • No successful deploy yet
  • Instance failing health checks
  • Server not bound to 0.0.0.0 and PORT
  • New custom domain still propagating (up to an hour)
  • Node keepAliveTimeout lower than the proxy's, giving Connection reset by peer
  • Gunicorn worker timeout (WORKER TIMEOUT, SIGKILL)

This guide also covers

  • render 502 bad gateway
  • render 503 service unavailable
  • render connection reset by peer

Still not working?

If Render keeps failing, you're not alone. See every Render problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

The same problem in other apps

All export, render & quality loss guides →

Other Render errors

All 10 Render errors and fixes →