Variables memory 4MB limit - What counts?

Hi, the documentation on Variable size limitation says ‘The payload of a process instance is limited to 4 MB. This limit includes both process variables and workflow engine–internal data, so less than 4 MB is available for variables alone.’

I wanted to clarify whether this included input mapping data into nodes, and specifically for multi-instance nodes.

I have a process where I’ll be kicking off User Tasks via multi-instance, in the order of tens of thousands (e.g., 20k). Obviously, I’ll be batching the retrieval of the base data required for the task e.g., assignee and key entity ID so that the size of the process variable for the batch data is small (e.g., 100 items worth).

  • My question is that even if I do batch, will the input mapping data stored per instance of the User Task multi-instance node count to the 4MB variable / process limit of the parent instance? E.g., if I’ve already created 10k tasks with batching, will the input mapping data for those 10k tasks count to the parent’s limit?
  • Or is this safe to do and even if I had hundreds of thousands or millions of multi-instances, as long as only the variables in the parent’s scope (in this example the batched data for 100 items) + any workflow data are less than 4MB?

Input mapping data for multi-instance activities creates local variables within each instance’s scope and does not count towards the parent process instance’s 4MB limit - only variables at the parent scope contribute to that limit. I found the following relevant resources:

Does this help? If not, can anyone from the community jump in? :waving_hand:


:light_bulb: Hints: Use the Ask AI feature in Camunda’s documentation to chat with AI and get fast help. Report bugs and features in Camuda’s GitHub issue tracker. Trust the process. :robot: