Are you experiencing a 500 Internal Server Error when trying to load your website, Plesk, or cPanel?
Do you see a Database DB query failed: SQLSTATE[HY000] error?
One of the most common causes of a 500 error is that the server has run out of disk space or inodes. Follow these troubleshooting steps to diagnose and resolve the issue.
Step 1: Check Server Availability via SSH
Before diagnosing the issue, ensure you can still connect to the server. 500 errors do not typically affect SSH access, so if you’re unable to SSH in, the problem might be more severe (e.g., system crash, network failure).
Log in via SSH:
For Linux servers, use:
ssh root@yourserver.com
(Replace yourserver.com
with your actual server hostname or IP address.)
Step 2: Check Disk Space Usage
A full disk can prevent your server from writing temporary files, logs, or database queries, leading to a 500 error.
Check disk space for all partitions:
df -h
- If any partition is at 99% or 100%, it is likely causing the error.
- Common problem areas:
/var
, /tmp
, /home
, or /
(root).
How to Free Up Disk Space:
Step 3: Check Inode Usage
Even if the disk isn’t full, running out of inodes (file allocation structures) can also cause 500 errors.
Check inode usage:
df -i
- If IUse% is at 99% or 100%, your server has too many small files, preventing new files from being created.
How to Free Up Inodes:
Step 4: Clear Space on a Plesk Server
If you’re running Plesk, you can use its built-in repair tools to clear temporary files.
Try the Plesk Repair Tool:
Access it via:
https://yourhostname:8443/repair/
This tool can automatically clean up temporary files and fix common issues.
Check and Delete Plesk Backups:
List existing backups:
/usr/local/psa/admin/bin/pmm-ras --get-dump-list | grep .xml
Delete old backups (replace with the actual backup filename):
/usr/local/psa/admin/bin/pmm-ras --verbose --debug --delete-dump --dump-specification=backup_info_YYYYMMDD.xml --session-path=/var/log/plesk/PMM
Step 5: Remove Files via SFTP or File Manager
If SSH access is available, you can also connect via SFTP (port 22) using an FTP client like FileZilla to navigate and remove unwanted files.
Alternatively, use cPanel’s File Manager or Plesk’s File Manager to delete files if you still have access to the control panel.
Step 6: Restart Web Services
After clearing space, restart the web services to apply changes.
Restart Apache (for most web servers):
systemctl restart apache2
or
systemctl restart httpd
Restart Nginx (if used as a reverse proxy):
systemctl restart nginx
Restart Plesk (if applicable):
service psa restart
Step 7: Verify Fix & Test Website
Once disk space is cleared and services are restarted, check if your website or control panel loads correctly.
Conclusion
By following these steps, you can diagnose and fix common causes of 500 errors related to disk space and inode limits. If you’re still having trouble, check for PHP configuration issues, permission errors, or database corruption.
Let me know if you need further assistance! 🚀