-
-
Notifications
You must be signed in to change notification settings - Fork 782
Description
SUMMARY
We are looking for options and potential solutions on an issue in stack storm stack where 2 collections with-in mongodb bloat quite a bit - st2.task_execution_d_b, st2.workflow_execution_d_b.
We have a cron job to purge old data from mongo which uses st2-purge-executions, st2-purge-trigger-instances, curious if we have any flags or scripts to purge st2.task_execution_d_b and st2.workflow_execution_d_b collections(tables) explicitly ?
Our current approach to the customer is to drop the entire st2 db which is not ideal.
I looked at the current st2 purge operations and took a similar approach here is the PR : #4924 , please let me know if the approach makes sense.
STACKSTORM VERSION
st2 --version : st2 3.1.0, on Python 2.7.15
OS, environment, install method
A Centos VM : centos-release-7-8.2003.0.el7.centos.x86_64
Install method: Custom install - rpm.
Steps to reproduce the problem
The issue is caused with many workflows running over time and bloating the mongoDB. Here is the snapshot of the mongoDB
Here's a snapshot of the collections ( format : <collection_name>: ( ) )
st2.task_execution_d_b: 10.2 GB (1.9 GB)
st2.workflow_execution_d_b: 10.2 GB (1.8 GB)
st2.trace_d_b: 1.1 GB (334.0 MB)
st2.action_execution_d_b: 752.7 MB (165.2 MB)
st2.trigger_instance_d_b: 426.1 MB (107.1 MB)
st2.live_action_d_b: 292.4 MB (72.8 MB)
st2.rule_enforcement_d_b: 279.1 MB (82.5 MB)
st2.token_d_b: 219.1 MB (65.4 MB)
st2.action_execution_output_d_b: 18.8 MB (5.2 MB)
st2.action_d_b: 99.6 kB (48.0 kB)
st2.rule_d_b: 44.9 kB (28.0 kB)
st2.runner_type_d_b: 33.3 kB (24.0 kB)
st2.pack_d_b: 23.9 kB (20.0 kB)
st2.trigger_type_d_b: 16.1 kB (20.0 kB)
st2.sensor_type_d_b: 7.3 kB (16.0 kB)
Expected Results
What did you expect to happen when running the steps above?
Expect a support for purging workflow executions and task executions entries in the mongo DB.
Actual Results
What happened? What output did you get?
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!