Table of contents:

What error 503 means and how to fix it
What error 503 means and how to fix it
Anonim

Instructions for general users and site administrators.

How to fix error 503: the definitive guide
How to fix error 503: the definitive guide

What the 503 error means

Code 503 indicates that the running service is unavailable (Service Unavailable). Most often this is not for long: for example, access to the resource is closed during a reboot or for maintenance.

But sometimes the 503 error occurs due to the fact that the work of the system is not organized correctly. The server interacts with the request queue: accepts them, processes them and issues a response. It handles light queries quickly, while complex ones take a long time. If there are many such heavy requests, the queue advances slowly.

The queue length is usually fixed. When you visit the site, you send a request to the server. If there is no room for it, error 503 will appear.

What to do for a user with a 503 error

Try these steps - there is a chance the problem will be resolved.

Check if everyone gets an error

These online services will show if all users cannot access the site or if the 503 error appears only for you:

  • Down for Everyone or Just Me;
  • Website Planet;
  • 2IP.

The latter is especially convenient: it makes requests to the site from servers from different countries and shows the response code. If there is a 503 error in at least one case, then you are definitely not alone.

If the services show that the resource is available, try accessing it from another device. Or ask your friends to check if everything is okay with the site.

Please wait and try again later

Refresh the page. If you still see error 503, try visiting the site later: in a couple of minutes or when there are potentially fewer users. This applies primarily to games or resources that have become very popular. For example, if the government announced new payments that are issued online, the server capacity may not be enough for everyone.

Reboot your device

If only you are experiencing the problem, restarting your smartphone, computer, or tablet may help.

If that doesn't work, restart your router as well. This can be done in three ways.

1. Via the control panel

It is usually located at 192.168.0.1 or 192.168.0.1. IP is entered directly in the browser, but options are possible - check the instructions for your model.

In the panel you need to find the button "Restart" or "Restart": it can be in the menu "System", "System" and so on. Click and wait for the page to refresh.

What to do in case of error 503: restart the router through the control panel
What to do in case of error 503: restart the router through the control panel

2. Using the shutdown button

The On / Off button is usually located on the back of the router. Click on it, wait 20-30 seconds and turn on the device again. This time is enough for the capacitors to discharge, memory chips stop receiving power, all temporary data is reset.

Important! Do not confuse the On / Off button with Reset, which not only reboots the router, but also resets its settings. If the button is recessed into the body and you need a match or screwdriver to press it, do not try to reach it.

3. By unplugging from the socket

Unplug the power adapter, wait 20-30 seconds, and then plug it back in.

Change DNS addresses

Fortunately, the DNS server addresses can be changed. So, you can use Google's public DNS IP: 8.8.8.8 and 8.8.4.4 for the IPv4 standard, 2001: 4860: 4860:: 8888 and 2001: 4860: 4860:: 8844 for the new IPv6. Here's how to do it.

1. On a Windows computer

Press Win + R. In the Run window, enter ncpa.cpl and press Enter.

What to do on error 503: Enter ncpa.cpl
What to do on error 503: Enter ncpa.cpl

Select the connection you are using, right-click on it, click on "Properties".

Click on "Properties"
Click on "Properties"

In the list of components, find the item "IP version 4" or "TCP / IPv4", click "Properties". Check the radio button "Use the following DNS server addresses", enter 8.8.8.8 and 8.8.4.4 in two lines.

If you have "IP version 6" or "TCP / IPv6" in the list of components, you can similarly set the addresses 2001: 4860: 4860:: 8888 and 2001: 4860: 4860:: 8844.

What to do in case of error 503: set addresses
What to do in case of error 503: set addresses

It is also advisable to reset the DNS cache. To do this, hold down Win + R again, in the "Run" window enter cmd.

What to do on 503 error: type cmd
What to do on 503 error: type cmd

In the console write ipconfig / flushdns and click Enter.

What to do on 503 error: write ipconfig / flushdns
What to do on 503 error: write ipconfig / flushdns

2. On a computer with macOS

Go to the menu "System settings" - "Network". If you see an icon with a closed lock at the bottom left, click on it and enter the administrator password in the window that appears.

What to do in case of error 503: go to the menu "System settings" - "Network"
What to do in case of error 503: go to the menu "System settings" - "Network"

Click on the required connection and select the "Advanced" item from the menu.

How to fix error 503: select "Advanced" from the menu
How to fix error 503: select "Advanced" from the menu

On the DNS tab, click on the "+" and add addresses to the list.

How to fix error 503: click on the "+" and add addresses to the list
How to fix error 503: click on the "+" and add addresses to the list

Clear the DNS cache. Start terminal, write command sudo killall -HUP mDNSResponder … Then press Return and enter your admin password.

How to fix error 503: write the command sudo killall -HUP mDNSResponder
How to fix error 503: write the command sudo killall -HUP mDNSResponder

3. On the router

Go to the control panel of the router and find the item with the addresses of the DNS servers - they can be in the DHCP settings. Enter two addresses in the correct format (IPv4 or IPv6), depending on what your device supports.

How to fix error 503: enter two addresses
How to fix error 503: enter two addresses

Clear YouTube cache on Android

On Android devices, the YouTube app 503 error sometimes occurs due to corrupted information in the cache. Try clearing it to get the service up and running again. Act like this.

Go to settings. Find YouTube in the list of apps.

How to fix error 503: go to settings
How to fix error 503: go to settings
Find YouTube
Find YouTube

Stop it and click "Clear cache". Then run the application again.

Stop it working
Stop it working
Click "Clear cache"
Click "Clear cache"

Shrink your YouTube playlist

Sometimes error 503 occurs when there are too many videos in your Watch Later playlist. Try shrinking it and then reloading the page or app.

Contact the administration of the resource

Perhaps the site administrators are not yet aware of the problem. Or, conversely, they know how to solve it or how much everything will work. In short, if none of the above helped, contact them.

What to do for an administrator with a 503 error

It all depends on the engine of your site and its settings. Choose the appropriate options and check if this solved the problem.

Set the Retry After option

It shows how long after receiving the 503 error the client should wait before the next request to the server. The value is indicated in milliseconds, you set its value yourself. This will prevent too frequent repeated requests.

Review the timing of regular assignments

Transfer mailing lists and other tasks that are usually located in the system Cron to the time of minimum server load. And at the same time, refresh your memory of the rules for using hosting so as not to violate the restrictions on the number of letters sent and the running time of scripts.

Install DDoS protection

These are also requests that go to the general queue. Get rid of them - you can quickly provide users with access to your resource.

Don't transfer large files over

Usually hosters limit the running time of scripts. If you transfer large files through such a script, it is highly likely that you will not invest in the limit. In addition, the transfer will take a separate process, which means that it will not be able to process requests from the general queue.

Transferring files directly in this situation is more beneficial. It uses a multi-threaded process, which does not so much affect the loading speed of the site or the service as a whole.

Remove heavy or outdated CMS components

Try to turn off the components of your CMS one by one and watch the situation change. If you find a potential source of the problem, try updating this component. Or think about how to do without it - for example, replace it with a newer and faster analogue.

Combine resources into one file to reduce the number of requests

If your web application uses a lot of small resources (images, stylesheets, scripts, and so on) and loads each of them with a separate request, they can take up a significant portion of the queue. To solve the problem, combine everything into one file.

Remove connections to remote servers

They may not respond for too long. In the meantime, the rest of the requests to your server will wait for processing.

Look for such problems in the code, and if you cannot do without a remote server, set a small timeout to wait. Consider actions in case he does not have time to respond.

Optimize MySQL queries

If you use MySQL and some of the queries are slow enough, some hosting providers automatically create a mysql-slow.log log file. It collects the most problematic database calls. Analyze them and optimize if possible.

Also, index the database and try to use caching components that would reduce the number of requests.

Install anti-leech

If another webmaster uses direct links to your resource, for example, inserts your pictures on his pages, this also increases the request queue. Anti-leech modules and settings effectively combat this. Some hosters allow you to enable them in the administration panel. For others, you need to configure everything manually, for example, through the mod_rewrite rules in the.htaccess file or individual modules.

Install caching components

They will help you offload the request queue and reduce the average processing time. As a result, there will be room for new hits, and users will not see the 503 error.

Consult the hoster

Perhaps the problem is not only you, and the hosting company experts know how to solve it. It will not be superfluous to go over the FAQ-materials before that and look at the latest topics on the resource forum. There is a chance that there are already ready-made instructions.

Recommended: