Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Camunda - Database growing quickly issue

I have a problem with my database. It’s growing so quickly. I’m using MySQL 5.7.24, Spring Boot and History Level Audit. Now my database is ~100GB.

Does anyone knows a technique or tip how to reduce the size of database? Can I delete byte arrays from ACT_GE_BYTEARRAY or move some history data to another database?

If I move some historic data to another database, how can I access it from history service?

Current size of my table is:

  • ACT_HI_VARINST => 10.66 GB
  • ACT_HI_PROCINST => 0.46 GB
  • ACT_HI_TASKINST => 0.01 GB
  • ACT_HI_ACTINST => 15.92 GB
  • ACT_GE_BYTEARRAY => 29.49 GB
  • ACT_HI_DETAIL => 16.02 GB

P.S. I've started to modify processes to use small(simple) variables instead of "big" variables - serialized objects that are too big, to reduce size of ACT_HI_VARINST.

Thanks in advance.

like image 600
Heril Muratovic Avatar asked Sep 14 '25 13:09

Heril Muratovic


1 Answers

You will have to look into the History Time To Live (TTL) feature that was introduced in the past year. You can define a time interval after which old instances will be removed. If you still need the data for reporting, consider exporting it to a suitable storage, maybe camunda optimize/elastic is a solution here. So in short: define TTL and write exporters that store important data somewhere else before it's deleted.

Keep in mind that storage management for a (camunda) process application is no trivial matter, depending on the nature of your processes (straight through vs. long running) and your auditing requirements you will need a large schema.

like image 117
Jan Galinski Avatar answered Sep 16 '25 02:09

Jan Galinski