Graphic of a computer monitor with a frown face on the screen and x's for eyes. Clouds and spots float around, an exclamation point triangle alert symbol shows next to the monitor. It reads "server error" on the monitor.

What is a HTTP 500 Error & How Can You Fix It?

One of the most valuable features of AlertBot’s web monitoring solution is that is automatically and continuously scans web pages for hundreds of possible errors, uniquely identifies them, and even captures a screenshot.

Today, we’re going to take a deeper look at one of the many possible errors that AlertBot flags as part of its ongoing scans: HTTP 500 errors.

What is a HTTP 500 Error?

An HTTP 500 error is an all-purpose error code. Basically, any error that doesn’t fit into an existing error code (e.g., 400: bad request, 403: forbidden, 404: not found, etc.), gets labeled as HTTP 500.  Here’s what an HTTP 500 error looks like over at Google:

Screenshot of an Apple browser with a Google 500 error page showing a broken robot illustration.Image source

Potential Causes & How to Fix Them

Here are some of the common triggers for an HTTP 500 error, along with possible solutions:

 

  • A corrupt .htaccess file. This is a text file that instructs software to enable or disable certain functions. It may be possible to fix this by examining your site’s .htaccess file and verifying that it is properly structured. Check out this easy-to-follow tutorial.
  • A permission error. This could be caused by networking issues, end user mistakes, or that most hated of virtual creatures: bugs! It may be possible to fix this by adjusting the permission on a CGI or PHP script.
  • A database connection error. Begin your (hopefully short) troubleshooting journey by verifying that the database login credentials are correct. If that doesn’t do the trick, then your database may be corrupted. Unfortunately, this is quite common; especially if you use WordPress, since the database is constantly being modified by users, plugins, and themes. Start by logging into phpMyAdmin, selecting all of the tables in the database, and then choosing the “Repair Table” option from the drop-down menu. If this doesn’t work, then restore your site from a working backup (you DO have a working backup, right?).
  • Faulty plugins. As you might expect, the simplest (but admittedly, not all that enjoyable) troubleshooting approach here is to start deactivating plugins one-by-one, starting with the most recently added.
  • Exceeding your PHP memory limit. Basically, PHP allows a default amount of memory to be used when processing a site. But sometimes, a certain page needs more than memory. If the problem is on the server-side, then try any/all of these methods: edit the PHP.ini file, edit the .htaccess file, edit the wp-config.php file (If working in WordPress), increase the PHP default memory using cPanel (if working in cPanel), or increase the PHP default memory via ini_set() function. Here is a simple tutorial for each method.

 

  • Browser compatibility issues. The best way to deal with this is by avoiding it in the first place by conducting rigorous cross-browser testing. If you did that and you still get a HTTP 500 error (or if you didn’t do that, but you pledge to do it going forward!), then check out these potential solutions.

 

The Final Word 

Use the above strategies to help you pinpoint and eliminate HTTP 500 errors — ideally as quickly and easily as possible. You can also rely on AlertBot’s comprehensive failure reporting to get notified when and where HTTP 500 errors occur.

Start a free trial of AlertBot today. There is nothing to download or install, no billing information is required, and you will be 100% setup in minutes. Get started now: click here.

Leave a comment