How to Troubleshoot HTTP Error 500

How to Troubleshoot HTTP Error 500

If you've ever gotten an http error 500 notice, you've undoubtedly wondered why. No need to anymore as today we’ll explore what an http error 500 message is, common reasons it occurs and how to troubleshoot them. We’ll also look at how Luxhosting.lu’s web hosting services can help minimize the frequency of this error message.

What is http error 500?

server rack vps

Image source: elements.envato.com

When you get an http error 500 instead of a loaded webpage, it means there was a problem with the connection to the server that requested the page to be loaded. The downside with an http 500 error is that you can’t know for sure exactly what the cause of the error is. However, there are several ways to figure out the source of the error.

An http error 500 message is a sign that there is an internal server error. There is, however, a series of 500 error codes that speak to different types of internal server errors. This is why when you receive this type of error message it is difficult to pinpoint the exact cause.

In anticipation of figuring out the cause for a 500 error message, consider installing Microsoft Internet Information Services (Microsoft IIS). This application will assist you in detecting the specific error code with the use of decimal places to indicate the cause of the error.

Typical http 500 error sources

Below are 5 error sources that commonly occur when you receive a 500 error message:

  • PHP Timeout – This occurs when the script attempts to access an external resource but a timeout takes place instead.
  • Permission error – When the main files and folders are not set correctly.
  • PHP memory limit – If a process happens to exceed the server’s memory and cannot be executed correctly.
  • Error Syntax/ CGI code/ Perl Scripts – This type of error message occurs in cases where scripts are incorrect and paths become misaligned.
  • Incorrect code in .htaccess – This error message could indicate that the structure of the.htaccess file is incorrect.

Additionally, these issues can be caused by installing a malfunctioning or incompatible plugin on your CMS.

How to troubleshoot for http error 500

If persons visiting your site report that they are getting an http 500 error message when attempting to view your site, you should quickly try to figure out the cause. If you fail to do so, it could have terrible repercussions such as scaring off your visitors and lowering your search ranking on Google.

The first thing you should always do is check if your server is still running. If it is not, then contact your hosting provider immediately.

If the server is working then do the following:

Reload your website

First, view your log files. If you have a Linux Server, you will find your error messages collected at /var/log/httpd/error_log. You can consider reloading your website to reproduce the http error 500 code and observe how the log file is being created. By doing this, it will help you find the error source faster.

You may also consider any changes made before the error occurred. Most of these errors are caused by an incorrectly programmed or incompatible plugin.

Check website permissions 

Second, check if you have set your website permissions correctly for all important files. Generally, there are 3 types of rights: Read (r), Write (w) and Execute (x). These permissions relate to the 3 types of users namely, the owner of the file, group of users and all others.

To identify the specific right, you use the abbreviations r, w and x or in their corresponding numerical values: 4 (for read), 2 (for write) and 1 (for execute). The identification works when you see them added for each user type and specified in sequence. For example rwxr-xr-x (with rwx for the owner, t-x for the group, and r-x for all others) or 755. The 755 configuration should be your default setting. An error may occur if your permission assignment is set up incorrectly. To fix this use the following command: Chmod 755 filename. If this doesn’t solve the problem you can release all the rights for each group for testing purposes. Just use the following command: chmod 777 filename. You can only use this setting to locate the problem, otherwise, your users will be allowed to rewrite the file which could prove to be a security risk.

If none of these solutions we have offered works, the best thing to do is contact your webhosting provider.

Finally

As a website visitor receiving an http 500 error message there is very little you can do, except report it. You can, do this by contacting the webmaster. They may not even be aware that visitors are unable to access their site, so being informed will be helpful.

As the owner of a website, ensure that you are using the best web hosting service. At Luxhosting.lu we offer features and tools to enhance your sites performance as well as 24/7 technical support to help you with any assistance. If you're tired of inadequate support and slow server performance, switch to Luxhoting's powerful and fast servers or contact our support to find out how you can obtain optimal website uptime.

Tags:
The Future is in The Best Cloud VPS Hosting
The Future is in The Best Cloud VPS Hosting

You may know your way around web hosting if you’ve been operating your business online for quite some time. You’ve probably heard of data living in the c (...)
The main mistakes when choosing shared hosting plan
The main mistakes when choosing shared hosting plan

In this modern era, where everything is online, people need webhosting platforms to do their online business. But the first thing that comes to mind is what (...)
6 Advantages Of Shared Web Hosting And How It Works
6 Advantages Of Shared Web Hosting And How It Works

When it comes to web hosting, the term shared hosting will always popup. If you're unfamiliar with this web hosting option, we'll help you out by explaining (...)