Log Analytics
Local-First
← Back to analyzer

Troubleshooting

Fix 502 Bad Gateway in Nginx

Gateway returned an invalid response from upstream while proxying.

SQL Lens

Run this query locally to surface offenders.

SELECT time_local, request, status FROM logs WHERE status = 502 ORDER BY time_local DESC LIMIT 50
Investigate in HUD

Playbook

  1. Verify upstream pods/processes are healthy and accepting traffic.
  2. Check keepalive/timeout alignment between Nginx and upstream.
  3. Inspect error.log for upstream prematurely closed connection entries.