What to Do When Storage Is 100% Full on a Plesk Server

Author name

March 27, 2025

Full disk on a Plesk server


Actions to Recover plesk server

A full disk on a Plesk server can cause major service interruptions, including database crashes, website downtime, and inability to log in to the Plesk control panel. This guide explains how to diagnose the issue, free up space safely, and restart critical services to restore normal operations.

1️⃣ Symptoms of Full Storage

  • Plesk commands failing with errors like: DB query failed: Can’t create/write to file ‘/var/tmp/#sql_85c_0.MAI’ (Errcode: 28)
  • MySQL service stopping or switching to read-only mode.
  • Websites returning 500 Internal Server Error or “Unable to connect to database”.
  • Email queues stuck or failing to send/receive.
  • SSH commands like touch or login may fail due to no space left.

2️⃣ Step-by-Step Actions to Recover plesk server

Step 1: Check Disk Usage

df -h

Shows usage per partition. If / or /var is at 100%, cleanup is required immediately.

Step 2: Identify Large Directories

du -sh /* 2>/dev/null | sort -rh | head -20
du -sh /var/* 2>/dev/null | sort -rh | head -20
du -sh /var/www/vhosts/* 2>/dev/null | sort -rh | head -20

Common large folders:

  • /var/log/ → System and Plesk logs
  • /var/lib/mysql/ → Databases
  • /var/lib/psa/dumps/ → Local Plesk backups
  • /var/www/vhosts/ → Website data

Step 3: Clean Up Safely

  1. Clear large log files sudo truncate -s 0 /var/log/messages-debug sudo truncate -s 0 /var/log/agent360.log
  2. Remove old Plesk backups rm -rf /var/lib/psa/dumps/*
  3. Delete processed statistics files find /var/www/vhosts/system/ -type f -name ‘*.processed’ -delete
  4. Clear temporary files rm -rf /tmp/* rm -rf /var/tmp/*
  5. Rotate or compress logs logrotate -f /etc/logrotate.conf journalctl –vacuum-time=3d

Step 4: Find Large Single Files

find / -xdev -type f -size +500M -exec ls -lh {} \; | sort -k5 -rh | head -20

3️⃣ Restarting Services After Cleanup

Once you free space, restart key Plesk services in this order:

  1. Database Service systemctl restart mysqld
  2. Plesk Control Panel systemctl restart sw-engine sw-cp-server psa
  3. Web Servers systemctl restart httpd systemctl restart nginx
  4. Mail Services (if used) systemctl restart postfix systemctl restart dovecot
  5. PHP-FPM Pools systemctl restart plesk-php*-fpm
  6. Logging systemctl restart rsyslog

Check service status:

systemctl status mysqld httpd psa

4️⃣ Preventing Future Disk Full Issues

  • Enable log rotation in Plesk → Tools & Settings → Log Rotation.
  • Delete or move local backups regularly.
  • Monitor disk usage: watch -n 60 df -h
  • Set up alerts for disk usage above 80%.
  • Consider resizing disk or adding a dedicated partition for /var.

✅ Quick Recovery Script (Optional)

#!/bin/bash
truncate -s 0 /var/log/messages-debug /var/log/agent360.log 2>/dev/null
rm -rf /tmp/* /var/tmp/*
find /var/www/vhosts/system/ -type f -name '*.processed' -delete
systemctl restart mysqld sw-engine sw-cp-server psa httpd nginx postfix dovecot rsyslog
df -h

Make executable:

chmod +x plesk_free_space.sh

📌 Summary

  1. Identify large files and directories (du, find).
  2. Clean safely (logs, temp files, old backups).
  3. Restart services (MySQL, Plesk, Apache/Nginx, Mail).
  4. Set up monitoring and preventive measures.

This process helps you quickly restore a Plesk server after running out of disk space and avoid future incidents.

Related Posts

Featured imageFeatured image
Transform your morning routine with simple hacks...
This is placeholder text for a H2 headline Lorem ipsum amet...
Featured imageFeatured image
How technology is redefining our culture and...
This is placeholder text for a H2 headline Lorem ipsum amet...
Featured imageFeatured image
Staying grounded and healthy through mindfulness and...
This is placeholder text for a H2 headline Lorem ipsum amet...