Delete old records from act_ge_bytearray

Over the period act_ge_bytearray table size has grown to almost 200GB. Due to this deployment is taking long time and sometimes even times out (Spring Boot container based).

My question is, can we delete old records based on CREATE_TIME_ from act_ge_bytearray table?

We do not have history enabled, but we have lot of dormant process instance running (almost 22K).
I know correct way is to delete the running process instances, but we will have to write a script/batch for it.
I was looking for an intermediate fix till we create and run process instance deleting script.

Hello @Being_Nerdy ,

you can delete running process instances using the camunda api as well.

By deleting entries of act_ge_bytearray, you will cause inconsistencies which can lead to malfunction of the engine.

I would ask you to not save complex variables to the engine, but as actual entities and reference them from a process variable.

This will save space in the bytearray table.


Thanks @jonathan.lukas for your reply.
If I am to take the risk of deleting the records from byte array table and then after that delete the not required dormant process instances using api (reason being I will have to come up with some logic to identify dormant processes and then delete, which will take time) will the deletion of process instances work or will it error out?

Apologies, I did not understand your statement “but as actual entities and reference them”. Can you please elaborate or point me to an example. Thanks.

You can delete data by type_(3) in act_ge_bytearray.
Here are the types of data stores in act_ge_bytearray.

“REPOSITORY”, 1==>Stores your workflow

“RUNTIME”, 2. ==> Stores Runing processinstance variables which are json form

“HISTORY”, 3 ==> Stores historial data like your history JSON variables value and stack trace .
So you free up data that belongs “TYPE_=3”

1 Like

Hello @Being_Nerdy ,

by actual entities, I mean that you can create db tables for the entities you are using in your process.

Then, you can reference them by their IDs in your process instances.