cancel
Showing results for 
Search instead for 
Did you mean: 

Memory not cleaning up after object ends

CarlosPires
Level 3
Hi everybody, We're having some issues with memory running my process. We've already implemented all the recommendations BP made in this article: http://portal.blueprism.com/customer-support/support-center#/path/1141009962.  Also, we took in count the process solution design document, avoiding the use of child processes inside loop of the parent process. We're using objects inside loop of the main process. This process uses 2 applications, basically takes the info from one and paste it in the other, in the middle there're some validations and data conversions using some equivalence lists within excel. We've avoided using collections filtering. We attach and detach from the applications when needed. Both of the applications are web based and modeled with Google Chrome. We notice that the memory goes up particullarly when writing the new data onto the target system. When it finish writing there's no memory freeing up, It always goes up, and off course after sometime (around 30 cases), the process stops. For every case the memory rise up around 20~30 MB and doesn't release any of it. When the message "Automate.exe has stopped working" appears, the memory is around 1.3~1.4GB.  We've run the process in debug mode and control room, but we get the same result all the time.  Another thing we tried was reducing the application modeller from 250+ elements to around 120, using a lot of dynamic inputs. There's not a noticiable impact within the memory. We also tried using Firefox, and the result was the same.  Anyone have some suggestions? 
13 REPLIES 13

AmiBarrett
Level 12
As long as the process is running, objects and the state of all of their contents will remain in memory. If they didn't, you'd need to constantly reattach, and having global data items would be unfeasible.  The best thing I can suggest is to try and clear out data you no longer need as you go along, especially when it comes to collections. Suppose you have an action with a collection as an input, then the action spits out either another collection or something different entirely. As long as your input data isn't also being sent back out, you can use a calculation stage to empty it out before you reach the end stage on your action.

CarlosPires
Level 3
We already did that. We clear all collections that are not sent as outputs at the end of every action. Also we modified the Collection Manipulation VBO, so it clears all incoming collections for every action.

AndreyKudinov
Level 10
If you have multiple actions returning big collections, I'd also make them public and run the separate action to clean them up after collection is returned. It does not seem to be the problem in your case, although I can't be sure, but we noticed that even when process finishes with objects still containing big collections in memory, they don't seem to be garbage collected until that object is initialized for the next time, causing automate.exe process leaking memory after process ends. Cleaning up output collections and forcing GC seems to resolve it.

CarlosPires
Level 3
We've already made all possible optimizations we've found here. I'm starting to think there's some issue in how BP handles Chrome interactions and how those objects are being disposed. Are we the only ones with this problem around here?

david.l.morris
Level 15
Memory issues are a common theme in Blue Prism issues, but I haven't encountered or seen others encounter your specific issue before. That doesn't mean others aren't having the issue. More and more people are expanding to use Chrome automation, so I guess it's possible you've found a problem many others will eventually run into. I don't personally have any knowledge of how it could be that garbage collection is handled differently for data that is written into Chrome, but I suppose it's possible. I think I'll try to reproduce this later on. I'll come back and reply again if I'm able to make it happen as well. Have you submitted a ticket to Blue Prism on this? I know you posted in the forum and Blue Prism support may peruse the forums, but the quickest way to get support for such an unusual problem is to submit to them directly. You'll probably want to let them see the problem occur if possible. It sounds like you know how to reproduce the issue so that's good at least.

Dave Morris, 3Ci at Southern Company

CarlosPires
Level 3
Yes, I've already submitted a ticket to Blue Prism. They're looking into it, It's taking a little bit more than what we were expecting.  This issue is happening in more than one task, each of them developed by a different developer, using Chrome and everyone already implemented all the recommendations.

JayaPrakash
Level 3
Carlos, we are also encountering same issue. Do you have any updates on this. Thanks in advance...

CarlosPires
Level 3
Hi Jaya, Not for now. BP support team has escalated the issue to the BP Product team. I'd suggest you to create a ticket and submit all evidence, so if this is a major issue related to the Chrome Extension they may diagnose it and help us all solving it. As a workaround we are executing our tasks limiting the number of cases per run and running them multiple times as needed.  Regards, Carlos

DevikaMurugesan
Level 2
Hello Carlos, My team is facing the exact same problem and when we logged a ticket, we were advised that Chrome 72 is compatible only with Blue prism 6.2.4 version., so we were asked to upgrade., We are yet to do that., Are you on 6.4 or 6.4.2?  Regards DV