cancel
Showing results for 
Search instead for 
Did you mean: 

Free up Collections

Walter.Koller
Level 11
Hi,

I noticed collections somehow keep their memory footprint and structure after they have been used and rows have been added, even when using eg 'remove all rows from collection'. 

I experienced the situation in which my process runs out of memory even when 'reset initial values when page runs' is activated.

Another problem is to use collections dynamically, eg when having an action that executes changing SQL statements with changing result columns, Blue Prism is only able to run it first time but raises an error when running a second time with different result structure.

What is the best way to really reset collections?

Thanks

------------------------------
Walter Koller
Solution Manager
Erste Group IT International GmbH
Europe/Vienna
------------------------------
6 REPLIES 6

AmiBarrett
Level 12
Have you tried the "Remove All Rows" action to clear it?

As for SQL statements, it makes sense if it's coded to look for a column name that no longer exists. You should be able to use column indices instead, if you know the exact column position.

------------------------------
Ami Barrett
Lead RPA Software Developer
Solai & Cameron
Richardson, TX
------------------------------

Yes, I use remove all rows to reset the collection before/after the next iteration. When working with larger collections, it still crashes because of memory reasons.

For SQL results, I also use remove all rows, which makes the collection seem to be empty and without structure. When I try to use the same collection for a different result set with different structure, Blue Prism tells me the structures dont fit. When I try to remove columns from this collection (after remove all rows) it says this column does not exist. I didnt try to clear a collection when it is still with result data and remove each column separately, but this should not be solution anyways.

------------------------------
Walter Koller
Solution Manager
Erste Group IT International GmbH
Europe/Vienna
------------------------------

Walter.Koller
Level 11
I did some tests to replicate the problems but could not create an example with the out of memory problem, maybe there have been some other reasons like log size asf.

I have added an example with collection structure conflicts. The internal collection actions work just fine but utility objects raise problems. 
When 'removing all rows' from a collection it is still possible to 'get collection fields' return the previous structure and an action like 'merge collection' fails as fields do already/still exist.
The workaround is to have another collection without any structure or rows and assign it to purge the first collection.

------------------------------
Walter Koller
Solution Manager
Erste Group IT International GmbH
Europe/Vienna
------------------------------

VivekGoel
Level 10
Did you try garbage collection techniques?

https://rpatools.com/2019/02/garbage-collection-memory-management-in-blue-prism/

------------------------------
Vivek Goel
RPA Architect
Asia/Singapore
+6594554364
https://www.rpatools.com/
------------------------------

I was thinking of it but did not yet try it myself.

Thanks for the link!

------------------------------
Walter Koller
Solution Manager
Erste Group IT International GmbH
Europe/Vienna
------------------------------

can you confirm if garbage collection techniques, logging restriction or collection purging helped with the issue you were having?

Dex

------------------------------
Dexter Whelan
Senior mentor, technical architect
SAS
Europe/London
------------------------------