HTTP 500 — Internal Server Error
HTTP 500
Internal Server Error
Something went wrong on the server and it has no more specific code to describe it.
What 500 actually means
The catch-all server failure. The request reached the application, the application threw an exception or hit a condition it could not handle, and there was no better answer to give. It is deliberately vague to the outside world — a detailed error message would help attackers as much as users — which means the real explanation only exists in the server logs. Nothing you do as a visitor caused it and nothing you do as a visitor will fix it.
Common causes
- An unhandled exception in application code
- A database connection failure or a query that errored
- A syntax or fatal error introduced by a recent deploy or plugin update
- Wrong file permissions or ownership on application files
- A broken `.htaccess` rule on Apache
- The process running out of memory, or hitting a PHP memory limit
- A missing environment variable or configuration file after a deployment
If you're just trying to view the page
- Reload after a minute — many 500s are transient and clear on their own
- Try a hard refresh (Ctrl+F5 on Windows, ⌘ + Shift + R on Mac) to rule out a cached broken response
- Check a status page or Downdetector to see whether the whole site is affected
- Try another browser or device only to confirm it is the site; the fix is not on your end
- Report it to the site owner with the URL and the time — that is genuinely useful to them
If it's your site
- Read the actual error in the logs — the browser-facing 500 carries none of it. Look in the application log first, then the web server error log
- For PHP, check `error_log` and temporarily enable `display_errors` in a non-production environment
- Check whether the last deploy, plugin update or dependency bump correlates with the start of the errors, and roll back to confirm
- Verify database connectivity, credentials and connection pool limits
- Check disk space and memory; a full disk causes 500s that look like application bugs
- Confirm file permissions and ownership are correct for the user the web server runs as
- Add error tracking so 500s come with stack traces rather than being reconstructed after the fact
Reference
- Status code
- 500
- Reason phrase
- Internal Server Error
- Category
- 5xx — Server Error
- Cacheable by default
- No
- Defined in
- RFC 9110 §15.6.1
Common questions
- What does HTTP 500 mean?
- Something went wrong on the server and it has no more specific code to describe it. The catch-all server failure. The request reached the application, the application threw an exception or hit a condition it could not handle, and there was no better answer to give.
- How do I fix a 500 error?
- Reload after a minute — many 500s are transient and clear on their own
- Is 500 a client error or a server error?
- 500 is in the 5xx range, which means server error. The request was acceptable but the server could not fulfil it, so retrying later can succeed.
Related pages
- 502 Bad Gateway A proxy or gateway reached the server behind it and got back a broken response,
- 503 Service Unavailable The server is temporarily unable to handle the request, usually because it is ov
- 504 Gateway Timeout A proxy or gateway waited for the server behind it and gave up before an answer
- 524 A Timeout Occurred Cloudflare connected to the origin successfully but the origin did not finish re
- 521 Web Server Is Down Cloudflare could not connect to the origin server because it refused the connect
- 522 Connection Timed Out Cloudflare tried to open a connection to the origin server and never got a reply
- 520 Web Server Returned an Unknown Error Cloudflare reached the origin server but got back a response it could not make s
- 525 SSL Handshake Failed The TLS handshake between Cloudflare and the origin server failed.
- 526 Invalid SSL Certificate The origin server presented a TLS certificate that Cloudflare could not validate
- 530 Origin DNS Error A Cloudflare error shown alongside a 1xxx error code that carries the real expla
- 501 Not Implemented The server does not support the functionality needed to fulfil the request, usua
- 511 Network Authentication Required You need to log in to the network itself — this is a captive portal, not the sit