To fix a 5xxx error, you need to solve the problem causing it on the server. This may require code debugging, configuration updates, or installation of new system components. We've put together recommendations for people facing HTTP 500 error that doesn't report a specific problem.
The HTTP 500 response code doesn't indicate the actual problem, it just notifies you that something went wrong on the server.
Internal Server Error, or 500 server error means that the server is unable to process the request. One of the downsides of 500 is its effect on a site's place in the search engine results. Spiders stumbling across error 500 multiple times will lower your ranking and thus affect the number of traffic and potential profits.
The task of fixing the Internal Server Errors can be eased considerably by Microsoft Internet Information Services. This service specifies an error code in the form 500.xx, where the last two numbers indicate the detailed cause:
500.13: The web server is overloaded.
500.19: Configuration data is invalid.
As the code 500 is a common problem identification, you can look for the cause of the error almost everywhere. Most often 500 server error means:
While trying to fix the problem, remember that the 500 internal server error causes is almost always related to the server, not the client side.
Here are some recommendations if you, as a user, face an HTTP website 500 error.
Check the site at downforeveryoneorjustme.com. This service will tell you if the site is down for everyone or if the problem is on your side by checking the HTTP status code from the server.
Check the permissions of files and folders on the site. Using permissions 644 for files and 755 for folders is usually recommended. To set permissions, use an FTP client or the server console. Default permissions are set as 777 - permissions for all, including reading, editing, and other operations.
Check the .htaccess file. Error 500 may also be due to a misconfigured .htaccess file. Ensure that the .htaccess file syntax is correct and that there are no errors in it. If necessary, delete the .htaccess file and upload it again.
Check the server logs. Often the cause of internal server errors is described in the server logs (we described this method in the 5th step).
Contact your hosting provider. The hosting provider's technical support can help you sort out the problem and provide more information about the error.
Debug the script and view the server logs. Server logs usually contain information about errors that occurred in the script. Then fix the errors or syntax mistakes in the script. After fixing the script, you need to restart the server for the changes to take effect.
Check plugins and extensions. A conflict between several plugins and extensions can lead to Internal Server Error. Deactivate all plugins and, if the error disappears, turn them on one by one to find the problematic one.
Update your PHP version. If it takes more than five minutes to process a PHP request, it will automatically terminate and generate an HTTP 500 error. A possible problem could be an outdated version of PHP.
Update the CMS and other programs. HTTP 500 error can occur if the web application uses an outdated CMS version that is no longer compatible with the current software version or browser. When updating the CMS, you need to consider compatibility with other components of the system (e.g. database or extensions).
If a web application expects to get a certain parameter in a URL that is not there, this can cause a 500 error. In this case, you need to configure the server to handle any similar requests.
You can also check the desired URL at downforeveryoneorjustme.com. Here you will find out whether access to the page or site is limited only to you or to all users.
To check the server logs, you need to log into the server via some utility that is convenient for you (for instance, with ssh). Logs are usually located in the /var/log or /var/log/httpd folder.
To view the log file, use the cat or tail command. To view all the contents of the error.log file, use the command:
cat /var/log/error.log
To display the last 10 lines of the error.log file, use the command:
tail -n 10 /var/log/error.log
You may need to reload the website to reproduce the HTTP 500 error code and see how the log file is generated. This will allow you to recognize the real cause of the error.
Server and database logs. Check logs to identify the problem.
Database configuration. Check the correctness of connection and server settings.
State of the DB server. The server should not be overloaded and should have enough resources to process requests.
The scripts. Make sure that scripts work correctly and don't contain syntax errors.
Database permissions. The user (administrator) must have the necessary permissions to work with the database.
Network connection to the DB server. Check the stability of the connection.
Try restarting the database server. This may help solve some temporary problems with the database.
Errors of the 5xx type are most often related to problems on the server side and cannot be solved by the client.
The most common 5xx errors:
The causes of 5xx errors can be different. They can occur due to server overload, incorrectly running code on the server, unavailable database, incorrect server configuration or other services. The main problem with 5xx errors is not only the loss of traffic and customers, but also a lowering of rankings by search engines.