My disc quota is exceeded. What should I do?

Exceeded disc space quota is a common reason for the improper functioning of services on VPS or dedicated servers. Main symptoms: websites on the server don’t answer or connection with the database is lost. The first thing you need to do when web server services or database servers are down is checking the disc space. To do this, connect to the server via SSH and enter the following command:
df -h

You will see all partitions and how much space they take up. Based on the partition size, you can see what it is responsible for. If your main partition is 100% occupied, you need to clear up some space. To find out, which folders take up the most disc space, use the following command:
du -sh /*

If you see that a certain folder takes up too much space, use this command and check the size of the subfolders in this folder. For example, if the var folder takes up the most space, run this command:
du -sh /var/*

Repeat this process until you find specific files that take up the most disc space. Most often, these are log files. You can delete them with no consequences and thus bring your disc space back to the norm.

After clearing your disc space, restart web server services and database server:
service httpd restart (for CentOS)
service apache2 restart (for Ubuntu)
service mysqld restart

If you want logs to be deleted automatically, we recommend using logrotate package. With it, you can forget about this issue for good.

Related Articles

How to change folder permissions and owner recursively

When moving your website to the server and navigating through it in the browser, a nasty error...

Protection against DDoS attacks

DDoS is a type of attack when numerous requests are sent to the server. The processing of these...

CPU monitoring

To keep the server up and running, it is important to monitor the processor load and determine...

How to connect to the server via SSH

Despite the numerous server control panels available, the main administration method consists in...

How to create a personal VPN service based on a VPS server

To create a VPN service based on a VPS server, you need the following software: VPS server....