I've noticed in the past few months that my self-hosted retool setup (done via Docker on Ubuntu) is continuously using more and more disk space on my server.
Is this normal behaviour?
All database use is external to this server so it is just the Retool instance which is on there.
Does anyone have any suggestions on how to stop or regulate this disk space usage by Retool?
Hi @bg1900 Thanks for reaching out! Are you still experiencing this issue? Docker can accumulate large volumes, images, and containers over time. Please make sure to always take a backup before conducting any clean-up operations.
You could try:
Docker Optimizations: Prune unused Docker objects using docker system prune to clean stopped containers, unused networks, and dangling images. You can delete old containers with docker container prune, unused images with docker image prune -a, and Docker volumes with docker volume prune. Docs from Docker on this can be found here. Backup all necessary data before executing these commands.
Logging: Trim the logs for your container if they are taking significant space.If you still observe high disk usage, a deeper dive into your Docker images and volumes would be helpful.
thanks Tess. It does seem like retool/docker is logging aggressively. But even with changing the settings (as advised elsewhere on the internet) it does seem to continue to progressively use up disk space.
Is there anything to prevent the logs from building up? - rather than pruning them or trimming them after they have already gotten large?
Hi @bg1900 Yes, that looks good. What errors? Can you share a screenshot?
I believe if LOG_LEVEL and DEBUG are not included in the env file, the logging behaviour would be as though the env vars have been set to their respective default values:
Apologies for the delay here! Can you share where you configured the retool-onpremise_data volume? Are you able to share an example of what is being stored?
2. then you can connect to your postgres DB from here with:
psql "dbname=$POSTGRES_DB host=$POSTGRES_HOST user=$POSTGRES_USER password = $POSTGRES_PASSWORD port=$POSTGRES_PORT" (you shouldn't have to replace these as it should use your environment variables) otherwise connect manually using psql and manually entering your values
3. Then you can query the table sizes of all the tables in your DB with:
SELECT relname as "Table", pg_size_pretty(pg_total_relation_size(relid)) As "Size", pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size" FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;