Basic Troubleshooting When Your Website Has Problems
If your VPS-hosted website has problems, such as the website being unavailable, 500, 502 or 504 errors, database errors and so on, we strongly recommend performing the basic troubleshooting described below before contacting technical support. This information can help you either solve the problem yourself or speed up the handling of your request by our specialists.
Server availability from an external network
The easiest way to check whether the server is available is to use an online service that provides this function. There are many such services on the internet; you can find them by searching for "ping online", "check availability", "ping service" and similar queries. They are usually free and easy to use.
You can also check server availability from your computer's command line by running the following command:
ping SERVER_IP
If the server is available, you will see output with information about packets sent to and received from the server, which will look something like this:
To stop the command, press Ctrl+C.
If you do not see any packets being exchanged, the server is unavailable.
In this case, we recommend checking the network settings on the server: connect via SSH or use the web console in the control panel and run the following command:
ifconfig
An example of correct output, where the inet addr line is not empty, indicating correct network settings:
If the inet addr line is empty, this indicates a problem with the network settings, and you may need to configure a static IP address.
Are the services that run websites started?
To check the status of the services that run websites, connect to the server via SSH or use the web console in the control panel and run the following commands:
For Apache:
service apache2 status
or
service httpd status
For Nginx:
service nginx status
For MySQL:
service mysql status
service mysqld status
For MariaDB:
service mariadb status
An example of a service status when it is running:
If the word running is missing from the output, the service is not running.
In this case, first try to start the service with the command:
service service_name start
For example, for Apache2:
service apache2 start
Or:
service httpd start
For Nginx:
service nginx start
For MySQL:
service mysql start
service mysqld start
For MariaDB:
service mariadb start
After starting the service, check whether the website works. If the problem persists, move on to the next check.
Disk space status
You can get general information about disk space with the command:
df -h
The output will show the disk size and available space.
If the disk space is exhausted, you need to take action: expand the disk or delete unnecessary files.
To work with disk space, you can use the ncdu and du utilities.
Index node (inode) status
If the index nodes (inodes) are exhausted, this can also cause problems. The server will start producing errors and warnings about insufficient disk space.
Permissions on log directories
You need to check whether the correct permissions are set on the directories where the main server services write their logs:
/var/log/mysql/
/var/log/nginx/
/var/log/apache2/
# or
/var/log/httpd/
You can check the permissions with the following command:
ls -l /var/log/
An example of correct output, where the directories we are interested in have the correct permissions (rwx) for the owner:
drwxr-x--- 2 root adm 4096 Aug 16 09:26 apache2
drwxrwxr-x 2 mysql adm 4096 Aug 16 09:26 mysql
drwxr-xr-x 2 root adm 4096 Aug 16 09:27 nginx
If a directory does not have the required permissions, you can set them with the chmod command:
chmod -R 755 /path/to/directory/
For example:
chmod -R 755 /var/log/nginx/
This sets permissions to 755 (rwxr-xr-x), which allows the owner to write, read and execute files, and everyone else to read and execute them.
If you find during the check that a log directory does not exist, you can create it with the mkdir command and set the required permissions, for example:
mkdir /var/log/mysql/
chmod -R 775 /var/log/mysql/
These steps will help you check the state of disk space, inodes and permissions. If some services still do not start after these checks, or the website problems persist, create a request to technical support and include the information you have collected.