Status codes · one code500 — Internal Server Error
What a 500 Internal Server Error response means, who is at fault, what a visitor should do and what the server owner should do.
Open the reference on this codeWhat to do
If it is someone else's site
On someone else's site there is nothing to do: the error is on the server, and neither a reload nor clearing the cache will fix it. Retrying in a few minutes is reasonable, and if the site matters, tell the owner — a 500 is often seen only by whoever stumbled into it.
If it is your server
Read the application log, not just the web server's: nginx records the fact of the error while the cause comes from the language or framework. Do not turn on error display in production: it hands strangers disk paths, versions and fragments of code. If the 500 appeared after a deploy, compare with the previous release before fixing anything: it is usually the release rather than the load.
Easily confused with
it is not the server that failed but the upstream behind the proxy: the application never answered at all.
502 →the server is alive and honestly says «not now»: overload or maintenance.
503 →How to check
the last thing the web server wrote — usually with the time of the crash
the application's own log: the cause is here rather than at the proxy
The reference holds sixty-four codes searchable by number, name and meaning — plus a breakdown of confusing pairs such as 401 and 403.
Updated