-
Notifications
You must be signed in to change notification settings - Fork 4
Free database space in demo environment #247
Comments
Labelled with |
Possible target for data retention in this service: 2 weeks, with use case of debugging recent ingestions. |
@giorgiosironi Are there instructions for accessing the |
Adding for future reference. How to access unstable/demo environments https://github.com/libero/environments/#tasks |
|
|
Kombu is the message queue right? Best candidate for a cleanup that doesn't delete useful data. |
From first glance, we can eliminate 612mb used by the It seems like we are not the only ones dealing with the issue of database entries retention. This blog post by Clairvoyant is about their experience of Apache Airflow maintenance and details similar issues we are facing and have open-sourced their maintenance DAGs. As a next step, I will look into seeing if we can use these DAGs on the Libero |
I can also see that |
Probably fair to say the message persistence is not very important at this moment, if we want to transition to something that keeps messages in memory. Especially as in this context the queue is internal to the application rather than a communication medium between services. |
Just checked the config file in 1.10.5. No new settings relating to this issue. Focusing on using Clairvoyant DAGs. |
unstable database size readings:
|
This night Despite the broken DAGs, we should be able to deploy the Kombu Redis change if it works in |
Current
|
Current
|
Added a |
Environment:
Results:
The overall disk space usage has increased but I suspect this is due to other services. Can see a 200mb reduction by airflow-db most likely due to removing the kombu tables. I don't see any difference to the I can confirm that data over 30 days old has been removed:
@giorgiosironi should I run the command to truly erase deleted data from postgres? |
Yes, also including |
Before running Environment:
Also we may want to clear old images:
|
It may leave a 10-month old image around if it's in use; the creation time of the image may be much older with respect to the time it has been pulled on that machine (which is not tracked). |
Environment:
Seems to be files written inside an Elasticsearch container:
Stopping the container as I can't log in with |
Have to actually remove the container to clear the space. It has a |
This freed 2GB:
Deployment can now proceed and will restart this container. |
A deployment cleared most of the space, that apparently consisted of files written inside containers (e.g. Elasticsearch logs):
Recreating the containers during deployment deleted all those files. This also explains why |
Everything is
returns a 502.
The index being in some kind of read-only mode? |
(renamed the ticket since the space is shared between all applications in the same environment) |
Appears to be related to the disk space usage: https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html |
Perhaps we should also look at log rotation? https://www.elastic.co/guide/en/elasticsearch/reference/7.3/logging.html |
demo latest:
|
will create separate tickets for elasticsearch specific tasks. @giorgiosironi happy to close this? |
Looks healthy and the checklist is complete, thanks. |
demo.libero.pub has an alert open for >80% of disk utilization. 86% currently so if unaddressed the demo may stop working in 2-3 weeks.
Old Docker images have all been cleaned up already. It boils down to the data in the
postgres
database ofjats-ingester
.Proposed solution
airflow
,psql
or else to clean up a sizable subset of old logs, or data that is not necessary anymore to run the demo. For example, logs of DAGs executed more than 1 month ago, or even all the DAGs runs that were executed more than 1 month agodemo
and possibly in theunstable
environmentsREADME
?) for when this happens again/cc @GiancarloFusiello
Checklist
unstable
environment has running DAGsunstable
environment has runningredis
brokerunstable
environment does not havekombu_*
tables anymoreunstable
environment has much less than 80% full disk spacedemo
environment has running DAGsdemo
environment has runningredis
brokerdemo
environment does not havekombu_*
tables anymoredemo
environment has much less than 80% full disk spaceThe text was updated successfully, but these errors were encountered: