cancel
Showing results for 
Search instead for 
Did you mean: 

Memory build up over time

MaxMcConchie
Level 5
Hi,

We have an automation that processes thousands of cases on a single VM. At the beginning, cases take 50 seconds each to complete but over time (After several hours of processing), cases start to take on average up to 4 minutes.

The automation uses a lot of Excel function so we believe that is causing some sort of memory build up.

Does anyone have any suggestions on how to fix it up so that it continues to run optimially each and every time?



Thanks

------------------------------
Max McConchie
Automation Manager
Australian Government Department of Finance
------------------------------
2 REPLIES 2

Hi Max,

Few things that straight away come to my mind are as follows:

- If you are trying to open and close excel a lot of times in your automation, avoid doing that as it can build up a lot of memory and can also result in memory leaks.

- Secondly, if you are using a lot of excel functions, think of a way if there is any chance where you can optimize the solution to just use collections and write it at once in the end. A lot of unnecessary issues can be avoided.

- Many times the second point is not possible to achieve. If that is the case, then you can perhaps create a custom object and use a simple code stage in one of the action that you create with the following code: GC.Collect()

This will forcefully invoke the .NET Garbage Collector which is generally invoked by the OS periodically. After closing the excel file instances, you can perhaps call this action to reclaim memory which has been designated as available to be recovered.


------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily

Regards,
Devneet Mohanty
Intelligent Automation Consultant
Blueprism 6x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

John__Carter
Staff
Staff
Hi Max

If you activate the memory logging function for that machine, you might be able to see where and when the consumption creeps up.
17628.png
And to add to Devneet's advice, check if you are inadvertently leaving 'ghost' instances of excel.exe hanging around in Task Manager.

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------