The site is unavailable – it is a rare but unpleasant error, which can occur for a number of reasons. Below we will consider how to diagnose and correct the situation with the help of handy tools, software, and utilities.
There can be several of them:
As a rule, errors of this kind are due to technical reasons, because of some internal failures on the server side. In most cases, this can be diagnosed and fixed.
First of all, you have to do a few simple things:
Now let's move on to more complex manipulations for system administrators.
If the storage space is full of logs, backups and other temporary files, you must connect to the server via SSH protocol and write two commands through the console:
This will show you how much space is free on the server SSD/HDD. If it shows something close to 100%, that is the reason why the site is not working. It just doesn't have enough space to run services and create new temporary files. In this situation, you can either clean up the existing space, or you can contact your hosting provider and expand your pricing plan.
Go to the control panel and check the status of services in the appropriate tab. In ISPmanager, for example, this menu is located on the left, in the "System" section. If any service fails - there will be a disabled "light" next to it. If any of these services is not working, you will have to deal with it separately.
When a site is inaccessible, in most cases the browser will give you some sort of three-digit error code when you try to open it. We have a separate article where we reviewed all the basic error codes that can occur when a client tries to contact the server. Once you understand the problem, it will be easier to localize and fix the error.
It is necessary to check the key points:
As a last resort, a previously created backup will allow you to roll back the changes to the state when the site was working properly.
Debugging information can be of great help in diagnosing and fixing bugs. For example, WordPress users can open the wp-config.php configuration file from the root directory in edit mode, and change the following directive in it:
As a result, the displayed information will become detailed and allow you to more accurately understand why the site is unavailable. Debug can be activated on any CMS:
If the site and the server use different versions of PHP, this can cause a conflict, and the resource simply refuses to load. In this case, the error description will directly inform about it. For example, this:
Extension ‘mysql’ is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead
This error means that the user is trying to run the site on PHP version 7.0, while it is adapted to an earlier version of PHP. In this case, you need to update the version of PHP on the site and on the server so that they coincide.
This is an advanced utility that allows you to diagnose and debug almost any error that occurs on servers running Linux. Connect to the server via SSH and then install strace:
sudo apt update
sudo apt install strace
These commands are Ubuntu commands, but for other operating systems it should not be difficult to adapt the command.
The syntax for strace is as follows:
strace -s999 -o /tmp/strace.txt /opt/php71/php index.php
Here we have:
With this utility you can monitor any system calls, which are a translation mechanism that provide an interface between a process and the OS kernel. You can intercept any calls and read them, which, with some skill and knowledge, allows you to diagnose and correct any error.
We hope that our article will help you understand why the site is unavailable and what you can do in this situation. If you have any questions, contact our specialists through Livechat. Take care!