Microflow Slows down to a stop whilst running

0
Hi, i have a microflow running processing about 2000 lines of data. But after running for a while it slows down considerably almost grinding to a halt. Previously this has been resolved by running the microflow in batches. But even when implementing this it still slows down considerably. (i know it is slowing as i added log messages and you can see the time getting bigger between each iteration). I am guessing its some sort of memory issue. Does anyone have any advice for this? or any way to clear the memory whilst in a microflow? TIA
asked
3 answers
2

In our case it usually helps to place the EndTransaction and StartTransaction from CommunityCommons inbetween batches.

Another option would be use of the ProcessQueue to process your data.

answered
0

I have noticed this happening in situations where an entity X or its (1:n) associated entities Y are updated, where the before-commit event(s) makes changes to (other objects of) X or Y. Everything gets locked by the updates, causing rapidly increasing processing times.

I have solved this by determining all changes and storing them in a temporary attribute in X and/or Y, and in a second batchprocess process these changes into the associated entities.

Only applicable for batch processes. If this happens in interactive processes, reconsider your datamodel.

answered
0

In this case, I would be looking at using a Queue or ProcessQueue (from the App Store) to break the processing up. If you do, each block will be run in its own transaction so you won’t have as much data in memory each time it’s run. 

answered