How to Fix 503 Service Unavailable Error in 7 Steps

How to Fix 503 Service Unavailable Error in 7 Steps

When a visitor accesses a website, the web browser sends a request to the web server. Occasionally, instead of responding to the request, the server sends a blank page with an HTTP status code. This indicates an error.

Most websites experience errors at least once in their lifetime. One of the most common issues is the 503 service unavailable error. When a web server is unable to process a request, it returns an HTTP 503 error.

The 503 service unavailable error, like any other server issue, can have a negative impact on a site if left unresolved. As a result, this guide will delve into the possible causes of this error and how to effectively resolve it.

First, let’s define the 503 service unavailable error.

Error code503 service unavailable error
Error typeServer-side error
Error variations503 Service Unavailable
Error 503 Service Unavailable
503 Service Temporarily Unavailable
HTTP Error 503
HTTPS Error 503
HTTP Server Error 503
HTTP Error 503. The service is unavailable.
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Error causesResource usage exhaustion
Server communication problems
Sudden traffic spikes
Distributed Denial of Service (DDoS) attack
Incorrect DNS configuration
Plugin or theme incompatibility

What Is 503 Service Unavailable Error and What Causes It

Web browsers and web servers interact using the HTTP (Hypertext Transfer Protocol) status codes.

Whenever you access a website, your browser sends requests to the web server hosting the content. The web server then fetches the requested resources along with an HTTP response status code.

Here are the five server response codes:

  • 1xx – informational, such as 102 Processing.
  • 2xx – success, such as 200 OK.
  • 3xx – redirection, such as 302 Found.
  • 4xx – client-side error, such as 403 Forbidden.
  • 5xx – server-side error, such as 503 Service Unavailable.

Usually, the servers only send back the requested website and browsers don’t display HTTP status codes, indicating that the connection is successful. However, whenever an error occurs, the servers will forward an error message along with the error code.

The 503 service unavailable error is one among these error codes. It’s common and happens on the server side, showing that the server temporarily cannot handle the request.

Below are the most common ways the HTTP error 503 messages can appear in:

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

Unlike other server-side errors, the HTTP error 503 service unavailable means that your web server operates properly but can’t be reached at the moment. Typically, it’s caused by a high number of requests sent to the server, which exhausts available resources.

In most cases, the 503 service unavailable error will disappear as soon as the traffic goes down. Hence, allowing visitors to view your content after a little while. However, when the error persists for an extended period, it might be an indication of a more serious problem within your server.

Therefore, the next section will show you the seven effective ways to find the root cause and resolve the 503 service unavailable error.

How to Resolve the 503 Error

From checking your resource usage to viewing server logs, we will walk you through seven ways to diagnose and fix the HTTP 503 errors. This way, you can prevent downtime and keep your site running smoothly.

1. Check Resource Usage

The resources that a server uses are RAM, CPU, I/O, entry processes, and website inodes. Checking these metrics can help you confirm whether the issue is related to limited resources. For example, you can monitor incoming traffic and detect whenever an unusual traffic surge occurs.

Hostinger offers a troubleshooting feature that will assist you in solving reached inodes or disk usage issues. If your plan uses 80% or more of the inodes or disk space, a new indication will appear on the Resources Usage page with four troubleshooting options. From there, you will be able to:

  1. Automatically clean up temporary and .log files
  2. Locate the path causing the issue
  3. Temporarily increase the disk storage to clean up files and folders manually
  4. Get a button to upgrade your plan
The Resources Usage page on hPanel. Four troubleshooting steps are displayed since the client reached their inode limit

Hostinger’s hPanel also has excellent functionality to monitor resource usage. Users can access the dashboard and navigate to the sidebar → Hosting → Resource Usage.

The Resource Usage menu in hPanel's sidebar

From there, you will find various metrics related to your website’s resource usage, including:

  • CPU – the amount of CPU power consumed by your site.
  • Memory limit – total memory used by your website to process requests.
  • Processes – the number of processes running on your hosting account.
  • Throughput (I/O) – the speed of data transfers between the hard disk and RAM.
  • Total requests – the amount of HTTP and HTTPS requests of all hosting accounts.
  • Bandwidth – data transferred within a specific period of time.

These metrics can help you solve the 503 service unavailable error. For example, look at the following metric:

Memory usage graph on hPanel

In the graph above, the red line represents your current plan’s limit, and the blue one shows the amount of memory used by your website. When your website exceeds the memory limit, it will slow down your overall performance, triggering the HTTP error 503.

A good rule of thumb is to upgrade your hosting package to increase these three server components:

  • CPU. Although the CPU can process numerous requests simultaneously, a constant strain can exhaust the CPU and slow down your site’s performance. Therefore, if you have a large volume of requests, it’s best to upgrade your CPU capacity.
  • RAM. A website with large traffic needs to have more RAM to keep it up and running. The more memory your website has, the less strain it will have on your CPU, allowing the server to run faster and process more requests.
  • Bandwidth. The more bandwidth you have, the faster data travels between your site, users, and the internet. If your site has a lot of dynamic content, such as images and videos, you will need a higher bandwidth allowance for optimized loading time.
Hostinger web hosting banner

2. Check for Ongoing Maintenance

Regular server maintenance is vital to optimize site performance and minimize security risks.

Pro Tip

Use tools like GTMetrix to get insights on optimizing your site performance.

Generally, a web server or application is set to shut down whenever it’s going through maintenance.

With that in mind, the HTTP error 503 service unavailable might occur during this unexpected maintenance. For instance, some web hosts usually provide their users with automatic updates whenever a new WordPress version is released. The system automatically issues the 503 service unavailable error during the process.

Contact your hosting provider to check if the 503 error is caused by scheduled maintenance. Hostinger users can simply go to our status page and see real-time updates of the system.

Alternatively, you can choose to modify your server configuration options and disable automatic updates. That way, you will have complete control over your server maintenance.

Below are the steps to disable automatic updates via Hostinger’s hPanel:

  1. Access your hPanel dashboard and go to Website → Auto Installer. Then, select WordPress.
The Auto Installer section, highlighting the "Select" button in the WordPress tab
  1. Next, fill in all necessary information, from your domain name to administrator login credentials.
  2. At the bottom of the page, you will see three automatic update options. Continue by selecting Turn off automatic application updates.
The turn off automatic application updates selection in hPanel's WordPress installation window
  1. Click Install and wait for the process to complete.

3. Stop Running Processes

Another common problem causing the 503 service unavailable error is exceeding the maximum process limit. When your web server processes too many processes simultaneously, it can overload and stop working.

To get your site back online, you will need to stop running processes. For VPS hosting users, you can kill a process using the kill command line.

Meanwhile, shared hosting users can navigate to the hosting control panel and go to the Resource Usage page. From there, scroll down to the bottom of the page until you find the Stop running processes option.

The stop running processes option on hPanel

Clicking on the Stop button will kill all ongoing processes on your website. Keep in mind that this solution is just a temporary fix – you still have to do further investigation to identify what is causing many processes to run simultaneously.

Start by examining your WordPress themes and plugins as they can use up resources and conflict with each other.

If you encounter the HTTP 503 error after installing a specific plugin, it means you have found the culprit. However, if you can’t identify which plugin is causing the problem, you might need to disable all plugins and enable them one by one.

Aside from plugins, poorly-coded WordPress themes can also trigger the 503 errors. To fix this, try to change your WordPress theme to a default one, such as Twenty Nineteen or Twenty Twenty.

If you keep exceeding the maximum process limit, some scripts or applications might be using more resources than your current plan provides. In this case, you will need to either optimize your website speed or upgrade your hosting plan altogether.

4. Reset Firewall

A web application firewall (WAF) blocks any suspicious traffic from coming into your site. In other words, the firewall protects your website against malicious activities, from brute force and DDoS attacks to cross-site scripting and SQL injections.

That being said, improper firewall configuration can detect false positives and block connections from a specific client. For example, your firewall might mistake a safe request from a content delivery network (CDN) as malicious, blocking critical traffic and triggering the 503 errors.

Resolve this problem by resetting your firewall configuration. Hostinger VPS users can go to the admin panel, navigate to the VPS Settings section, and click Reset Firewall.

The Reset Firewall button on VPS settings menu

However, the steps will vary depending on your hosting provider. It’s best to contact the support team and ask for assistance.

5. Check Server Logs and Fix the Code

If the 503 error still persists, try checking your error log.

Server-side logs record information about your website’s activities, from web pages requested by visitors to errors happening in the system. Using information from the logs, you can identify and fix errors more efficiently.

Usually, your hosting provider features the website error log through the admin dashboard. Hostinger users should access hPanel and go to Advanced → PHP Configuration.

Advanced section of hPanel, highlighting PHP configuration

The next step is to switch to the PHP Options tab and check the logErrors option.

logErrors option on the PHP Options tab

Scroll down to save the changes. Go to the public_html directory, open the wp_content folder, and view the error log file whenever an error occurs.

Additionally, you can also enable error logging by adding the WP_DEBUG PHP constant in the wp-config.php file.

To get started, open your website root directory and locate the wp-config.php file. Hostinger users can access hPanel and go to Files → File Manager.

  1. Click on the public_html folder and choose wp-config.php.
public_html directory with the wp-config.php file selected
  1. Add the following code inside the file:
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
  1. Once you’re done, click the disk icon to save the changes.
wp-config.php file, highlighting the wp_debug code snippet

Moreover, you can check the server error log on your web server software by accessing the following file accordingly:

  • Nginx server: /var/log/nginx/error.log/
  • Apache server: /var/log/apache2/error.log/

6. Restart Your Server and Networking Equipment

The 503 service unavailable error can happen due to connectivity issues between the server chain hosting your application.

Thus, if you have root access to your website, one of the easiest ways to fix the 503 service temporarily unavailable error is to reboot your server. If your site is hosted on multiple servers, make sure to refresh each server to return it to normal.

To do so, Hostinger users can access the VPS information tab and click on the Reboot VPS button.

VPS information tab, highlighting the Reboot VPS button

If the 503 service unavailable error persists, the problem might come from temporary issues within your computer devices and home connection. This can happen due to network misconfiguration that prevents your devices from processing requests.

In this case, a simple restart can get the job done – switch off all networking equipment, wait for a second, and turn it back on again. Once done, reconnect your computer to the network and reload your website.

7. Check Your DNS

Another possible factor causing the 503 error is a DNS-related issue, such as unresolved IP addresses, unresponsive DNS servers, or a corrupted DNS cache.

One effective way to fix this issue is to flush your DNS. The way to flush DNS cache depends on your operating system. Below, we will show you how to perform this task on Windows, macOS, and Google Chrome.

Microsoft Windows

On Windows, open the command prompt and input the following directive:

ipconfig /flushdns

The command will clear out the DNS files and restart the DNS resolver cache. A confirmation message will appear once the DNS is successfully flushed.

macOS

Mac users can press F4 to access Terminal and run the following command:

sudo killall -HUP mDNSResponder

Important! Different macOS versions require different commands.

Google Chrome

Google Chrome users can flush their DNS cache on their web browser.

Open the program and enter the following URL into the address bar:

chrome://net-internals/#dns

It will take you to the internal settings page. From there, select the Clear host cache option.

Clear host cache option

Temporarily switching your DNS servers is another method to try. Your DNS servers are assigned by your ISP by default, but you can always change them to third-party servers, such as Google Public DNS.

Conclusion

The 503 error is an HTTP status code that appears whenever the server is unable to handle a request. Usually, this error occurs during server maintenance. However, the 503 errors can also be a result of resource outages.

Although the error usually goes away on its own, it can negatively impact your site performance and user experience if left unattended. With this in mind, we have looked at seven effective ways to solve this problem and return your site to normal.

Let’s do a quick recap:

  1. Check resource usage – monitor your resource metrics to confirm if the issue is related to excessive use. If necessary, upgrade your hosting plan.
  2. Check for ongoing maintenance – contact your hosting service provider to see if scheduled maintenance is in progress.
  3. Stop running processes – kill ongoing processes that are overwhelming your server’s capacity.
  4. Reset firewall – revert an improperly configured firewall by resetting it through your hosting admin panel.
  5. Check server logs and fix the code – comb through your website error logs and resolve any unusual codes.
  6. Restart your server and networking equipment – reboot your server and networking equipment to resolve any possible misconfiguration.
  7. Check your DNS – flush your DNS cache and temporarily switch your server to public DNS.

All in all, we hope these troubleshooting steps help you remove the HTTP error 503 and get your website back up. Should you have any further questions, don’t hesitate to leave them in the comment section below.

503 Service Unavailable FAQs

To learn more about 503 Service Unavailable, take a look at the following frequently asked questions.

How Can I Prevent 503 Service Unavailable Errors?

Regularly monitor server resources, such as CPU usage and memory, and optimize website performance by minimizing HTTP requests, compressing files, and caching content. Consider upgrading to a higher-tier hosting plan if website traffic or resource usage is high. Hostinger offers an easy way to upgrade your hosting plan.

What Are Some Other Related Errors to 503 Service Unavailable?

Some related errors include 502 Bad Gateway, which indicates that the server acting received an invalid response from another server, and 504 Gateway Timeout, which indicates that a server acting did not receive a timely response from another server.

Author
The author

Nabilla R.

Nabilla is a website hosting and development enthusiast. She loves to share her knowledge with others in order to help them grow their online presence. When she's not busy writing, Nabilla enjoys exploring nature and going on adventures. She is passionate about helping people achieve their online goals.

Author
The Co-author

Freddy M.

Freddy is a WordPress theme reviewer at WP Theme Raves, a published WordPress blogger, web dev and founder of Vista Media Enterprises – an online business dedicated to WordPress users looking to boost conversion rates through content marketing. He shares his wealth of experience here.