Disk Space Issues
Over time, Docker images, log files, and database data can fill up your server's disk. Appliku automatically cleans up old Docker images, but heavy usage may require manual intervention.
Common Issues
Docker Images Accumulating
Each deployment builds a new Docker image. While Appliku automatically removes old images after successful deployments, servers with many applications or frequent deployments can accumulate unused images.
Check disk usage:
ssh app@<server-ip>
docker system df
Clean unused images:
docker system prune -f
This removes:
- Stopped containers
- Unused networks
- Dangling images (images not tagged or referenced by any container)
For a more aggressive cleanup that also removes unused images (not just dangling ones):
docker system prune -a -f
docker system prune -a removes all images not currently used by a running container. This means the next deployment will need to rebuild the image from scratch, which takes longer. Only use this when disk space is critically low.
Log Files Growing
Application log files and Docker container logs can grow large over time.
Check log sizes:
# Check Docker log sizes
sudo du -sh /var/lib/docker/containers/*/*-json.log | sort -rh | head -20
Solutions:
- Docker is configured with log rotation by default on Appliku servers, but if logs are growing excessively, check the logging driver configuration
- For application-level logs written to files, implement log rotation in your application or use
logrotate - Avoid writing verbose debug logs in production
Database Size Growing
Database containers store data in Docker volumes, which persist across container restarts.
Check database volume sizes:
docker system df -v | grep volume
Solutions:
- Review and clean up old or unnecessary data in your database
- Implement data retention policies (archive or delete old records)
- For PostgreSQL, run
VACUUM FULLto reclaim space from deleted rows - If the database is too large for the disk, consider migrating to a larger server or an external managed database
General Disk Space Monitoring
To check overall disk usage:
df -h
To find the largest directories:
sudo du -sh /* 2>/dev/null | sort -rh | head -10
Monitor disk usage proactively from the Appliku dashboard. The server overview page shows current disk utilization. Set up alerts before your disk reaches critical levels.