5xx Server error
HTTP 500 Internal Server Error
The server hit an unexpected condition and couldn't complete the request.
A 500 Internal Server Error means something went wrong on the server and it couldn't say exactly what. It's a catch-all for unexpected failures: the request itself was usually fine.
Common causes of a 500 error
- An unhandled exception or bug in the application code.
- A misconfiguration, such as a bad .htaccess rule, a broken environment variable, or wrong permissions.
- A failed dependency: the database is down, a query failed, or an external API returned an error.
- The server ran out of memory, disk space, or worker processes.
- A bad deploy: a missing file, migration, or incompatible library version.
How to fix a 500 error
- Check the server and application logs: the stack trace almost always names the cause.
- Roll back the latest deploy or config change to see if the error disappears.
- Verify the database and any external services are reachable, and that credentials are correct.
- Check disk space, memory and process limits on the server.
- As a visitor, reload after a few minutes or contact the site owner, since you can't fix it from the client.
Frequently asked questions
Can I fix a 500 error as a visitor?
Not really. Try reloading, and clear your cache, but the fault is on the server. If it persists, tell the site owner.
Why does the 500 page tell me nothing useful?
Servers deliberately hide error details from visitors because stack traces can leak sensitive information. The details are in the server logs.
What's the difference between 500 and 502?
500 means the server handling the request failed. 502 means a gateway or proxy in front of it got a bad response from the server behind it.
Other common status codes
See 500 in the full searchable list, or use the HTTP Header Checker to see the status code any URL returns.