Aug 25, 2022

Resolve HTTP Error 503 Service Unavailable!

Do you have a 503 error in your website? Do you want to solve it quickly? Then read our steps now and fix your website!

Resolve HTTP Error 503 Service Unavailable!

Resolve HTTP Error 503 like this!

You open your website and get the annoying error message “Service Unavailable” or “HTTP Error 503”. Your website no longer works and only shows this error message.

Variations of the 503 error

There are several variations of the 503 error, so the error that appears on your screen can appear in different ways. However, almost every variation contains the code : 503 which means that you can recognize the error as a 503 error. So as soon as you see the text 503, you know for sure that this manual is the right one to solve the error as soon as possible!

Below I have written down some variations of the error. These can differ per device, browser or server.

  • The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
  • 503 Service Temporarily Unavailable
  • 503 Service Unavailable
  • HTTP Error 503
  • HTTP Server Error 503
  • Error 503 Service Unavailable

HTTP Error 503

There could be several causes for this error in your website. In this article we will explain them all and show you how you can solve the 503 error easily and quickly!

Check the log file

First you start by looking in your log file. Here the error messages from your website are logged and you can see what caused the problem and often also which file caused the 503 error.

Every hosting provider has a control panel like DirectAdmin or Cpanel . On this control panel you then log in and look for the php error log or the http error log. It may have a different name but often it is simply called error log.

In this log you will see all entries / lines with text where an error is located, on which line the error is located and from which file.

Example log

Mon Aug 22 14:11:07.895464 2018] [lsapi:error] [pid 99647:tid 139625036831264] [client 1.2.3.4:123123] [host 1.2.3.4] Backend fatal error: PHP Parse error: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN)) in /home/username/domains/domain.com/public_html/wp-content/plugins/woocommerce/index.php on line 2.

In this log line you can see that there is an error in the file /home/username/domains/domain.com/public_html/wp-content/plugins/woocommerce/index.php on line number 2.

Fix the error found

Now that you know in which file and which line the error is located, go and find this file. You can often do this in the control panel of your hosting provider, or on the FTP of your web hosting package.

Often the error is found in a plugin of your website or a theme. This can be seen in the path of the file you saw in the error log.

In our example above you can see that the path contains the plugin name “WooCommerce”. In this case the error will most probably be in the WooCommerce plugin of WordPress.

Disable plugin or theme

Since fixing an error in a script is difficult if you haven’t built the plugin, I recommend you to first disable the plugin or theme within your website. This will make your website work again and then you can look for the right solution to the error in your plugin or theme so you can use it again.

How do I disable a plugin or theme?

You can disable them in several ways, but the easiest one is through the backend of your site. Here you can easily disable the plugin and it will not be used anymore by your website.

If your backend doesn’t work anymore, I advise you to log into the FTP and change the name of the folder of the plugin to another name.

In the example of the woocommerce plugin you change the folder to for example woocommerce-old after which the plugin will be disabled immediately.

Optimize website for speed

It is also possible that your website is so heavy and needs so much computing power that because of this the http 503 errors occur.

In this case you run into your resource limit and the server stops the processes of your website because there is no more processing power.

You can do 2 things in this case:

  • Provide a faster server / or a higher web hosting package
  • Or optimize your website for more speed / less processing power and higher google rankings

In the first case you should contact your hosting provider and see what is possible.

In the second case you can optimize your website yourself. By doing so you ensure that your website loads much faster, is built more efficiently and thus requires less processing power from the server.

You will therefore no longer get 503 errors, but also have a faster website and will probably also rank higher in Google because your TTFB (Time to first byte) is lower and Google will therefore sooner rank you higher in the search results than your slower competitor!

Video guide to solving 503 error

Categories

domainname webhosting php apache error