Skip to content

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

Warning

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.

It can also remove the image of the one_off container, which exits right after a deployment. Cron jobs, one-off commands and the release command use this image, and so does Restart. If a manual docker system prune -a removed it, cron jobs can rebuild the image on the server or fail. Restart fails if an image that it needs was removed. Run a full deployment of the application to get the image back.

The scheduled clean up that Appliku runs on the server (the "Full clean up schedule" in the server settings) removes stopped containers except Compose service containers (such as the one_off service of your application), unused images, unused networks and build cache. It does not remove the one_off image.

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 FULL to 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

Tip

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.