Error fix
How to fix “500 Internal Server Error”
The server hit an unexpected failure while handling the request—check application and dependency logs.
Updated Apr 20, 2026
Tools that help with this
Fastest fix
Start here first. Step 1 fixes most cases—then work down the list.
- Open your hosting logs or APM and reproduce once with a single request.
- Trace the failing layer: app server, DB, cache, or external API.
- Deploy a minimal fix and add monitoring for the same error signature.
Why this works
These steps work because it clears stale cached state that can cause the same request to fail repeatedly.
What this means
500 indicates a failure on the server side, not a bad URL format. The response body may be generic; logs hold the real exception.
Common causes
Unhandled exceptions
Null references, bad assumptions, or missing env vars in application code.
Upstream failures
Database timeouts, crashed workers, or misconfigured reverse proxies.
Step-by-step fix
Find the stack trace
- Open your hosting logs or APM and reproduce once with a single request.
- Trace the failing layer: app server, DB, cache, or external API.
- Deploy a minimal fix and add monitoring for the same error signature.
Related
Also see: 500 — browse the HTTP status hub.
FAQ
- Is 500 my fault as a visitor?
- Usually not—it's a server-side bug or outage. Retry later and report if it persists.
- 500 vs 502?
- 500 is often the origin app crashing; 502 is often a proxy getting a bad response from upstream.
- Should I expose details in the response?
- No in production—return a generic page and log details server-side only.
Fix related issues
Still stuck? Try these related fixes next.
- Kubernetes CrashLoopBackOffThe container exits repeatedly—check logs, probes, and resource limits.
- Heroku H10 — app crashedThe web process exited; Heroku serves an error page. Logs show the real exception.
- Netlify — page not foundThe deploy exists but no asset matches the path—often SPA routing or a missing file in publish dir.
- Vercel — deployment not foundThe deployment URL or project alias does not exist or was removed.
- Cloudflare 525 — SSL handshake failedCloudflare could not complete TLS with your origin—cert mismatch, wrong port, or TLS version.
Edit your error
Tweak the message and run again—we'll match an existing fix or generate a new page.
Original error message
500 Internal Server Error
