The server encountered an unexpected condition that prevented it from fulfilling the request.
The server encountered an unexpected condition that prevented it from fulfilling the request. It's a generic catch-all error when no more specific server error applies. Think of it as the server saying "something broke, but I'm not sure what."
A 500 Internal Server Error is returned when server-side code throws an unhandled exception, configuration is corrupted, or a critical resource is unavailable. Unlike more specific 5xx codes, a 500 is the default fallback when the server knows something went wrong but can't categorize the error more precisely.
This is the most common server error you'll encounter. It can originate from any layer of your application stack -- web server configuration, application runtime, database layer, or even filesystem issues.
.htaccess or web.config configuration files/var/log/apache2/error.log, Nginx: /var/log/nginx/error.log. The log entry will contain the specific error message and stack trace.644, directories should be 755. Incorrect permissions are a common cause, especially after deployments..htaccess file can cause Apache to return a 500 for every request. Temporarily rename it to test.memory_limit in php.ini or --max-old-space-size for Node.js. Increase if processes are being killed.df -h to verify sufficient disk space. A full disk prevents logging, temp file creation, and session storage.GET /api/users HTTP/1.1 Host: example.com Accept: application/json
HTTP/1.1 500 Internal Server Error Content-Type: application/json Date: Thu, 20 Feb 2026 12:00:00 GMT { "error": "Internal Server Error", "message": "An unexpected error occurred" }
/var/log/apache2/error.log. For Nginx, check /var/log/nginx/error.log. Application-level logs (PHP, Node.js, Python) will often contain the specific exception or stack trace that triggered the 500 error. Enable detailed error reporting in development environments for easier debugging.Monitor your website 24/7 and receive instant alerts when 500 errors occur.
Start Free Monitoring