Delete history with a default TTL

Hello,

I use the spring-boot Camunda engine and we already have deployed multiple processes working perfectly.
The problem is that we didn’t defined a TTL on the processes in the modeler so our history tables has grown huge !

So I tried to configure a process engine time to live, to do soI tried to define some properties to cleanup the history :

camunda.bpm.generic-properties.properties.history-cleanup-strategy=endTimeBased

camunda.bpm.generic-properties.properties.historyTimeToLive=P1D

camunda.bpm.generic-properties.properties.batchOperationHistoryTimeToLive=P1D

camunda.bpm.generic-properties.properties.historyCleanupBatchWindowStartTime=00:01

camunda.bpm.generic-properties.properties.historyCleanupBatchWindowEndTime=23:59

But our history tables are still huge …

Is there a problem with this configuration ?
Also, is there a way to check if the cleanup was trigerred ?

Thanks for your help :slight_smile:

Hi @yolohann,

The clean-up is recorded in the metrics:

You can query the metrics with this endpoint: Get Metrics in Interval | docs.camunda.org

Hope this helps, Ingo

1 Like

Okay, thanks for the input !

I see that history-cleanup-removed-process-instances deleted 500 processes yesterday (which is the max batch size according to the documentation).

At this rate, it will take months to clean the history
Does the cleanup batch only run once a day ? I understood it is ran whenever it is in the CleanupBatchWindow

Also, I have another question : some of my processes in the history have an ‘ACTIVE’ status, so they don’t have an endTime. Is there a way to flush them depending on their startDate ?

1 Like

Is there any recommended way to define / archive historical data to Data Warehouse solution before it gets deleted from live DB?

I’m sorry @Camunda_newbir but I think this is a different problem. Could you please open a dedicated topic for this ? :innocent: