Opyntel

Render 5xx errors and 502 Bad Gateway: find the cause and get alerted

Render 5xx errors most often start as a 502, returned when its proxy cannot get an answer from your web service. The process is not bound to 0.0.0.0:$PORT, it crashed mid-request, or a worker was killed by a timeout. Render charts requests by status code but sends no notification when 5xx errors rise. For the general picture, see 502 Bad Gateway.

Where Render shows 5xx errors

A web service’s Metrics page has a Total Requests chart you can group by status code. It counts only requests from the public internet, and keeps 7, 14 or 30 days depending on your workspace plan.

The usual causes of a Render 502

  • 502 on every request right after a deploy: the app is not listening on 0.0.0.0:$PORT.
  • 502 on some requests: a worker was killed mid-request, by an out-of-memory kill or by the server’s own timeout, such as Gunicorn’s --timeout. See Render out of memory.
  • Intermittent 502s on Node: the server closes keep-alive connections before Render’s proxy does. Raise keepAliveTimeout and headersTimeout above the proxy’s.

What Render does not alert on

Render notifies you about failed deploys, services that become unhealthy and disks over 80 percent full. It has no notification for HTTP error rate, so a service that stays healthy while failing a share of its requests goes unnoticed.

How Opyntel alerts on Render 5xx errors

Opyntel reads each web service’s status codes from the Render API and alerts you when its error rate crosses your threshold, by email, Slack or SMS depending on your plan. History goes beyond Render’s retention: 30 days on the free plan, a year on Pro and unlimited on Enterprise.

FAQ

Render 5xx questions, answered

Persistent and intermittent 502s, and alerts on error rate.

It is almost always the port binding. Listen on 0.0.0.0 and the port in the PORT variable.

Not on its own. Its notifications cover deploys, unhealthy services and disk usage. Opyntel adds an error-rate alert.

The alerts your platform doesn’t send.

One dashboard for everything you run, with the alerts your platforms leave out. Read-only, nothing to install in your apps.

See how it works