15-03-23 08:12 AM
Why do we get out of memory exception? and how to fix it?
15-03-23 09:24 AM
This has to do with RAM usage of your resource PC.
Optimize the process to reduce the amount of memory it requires by removing unnecessary objects, optimizing code, or using more efficient data structures, Also make sure you release the objects when they used and connect back when required.
Ensure that the system is not running other memory-intensive applications while the BP resource is processing the workload.
System Memory Out exceptions in Blue Prism occur when the Blue Prism Runtime Environment runs out of available memory to process the current workload. This can happen for several reasons, such as:
The BP Run time resource is running multiple processes concurrently, and collectively, they require more memory than the system can provide.
There is a memory leak in the process, which means that memory is being allocated but not released when it is no longer needed.
15-03-23 12:35 PM
Hi Charudatta,
I agree with Mukesh - sometimes it's just because you're trying to load too much into a collection at once (reading in a large Excel file, for example). I found that my system usually errors at around 30,000 rows and 15 columns. If, however, you're saying you get out of memory exceptions during process run and you're not reading in large data, this could be because you're not cleaning up properly.
I read somewhere (not sure if it was a forum post or BP documentation), that when you use a collection to store data during a process, Blue Prism doesn't clean that out when the page ends. It keeps that data resident in system memory until the process ends and the system does the overall cleanup. You can force the memory reclamation by removing all rows from a collection once you're finished working with it. I usually put a memory cleanup block at the end of each page for every collection I use that isn't output in my end stage (use collection - remove all rows for all collections used, put in a block with a recover/resume that passes straight to end, no need to terminate if this fails). This immediately reclaims the system memory and speeds everything up.
Hope this helps.
15-03-23 03:43 PM
The important thing to understand is that the Blue Prism Automate.exe client is a 32-bit application. Because of that, it's limited to no more than 2GB of addressable memory. That's for the entire application. In reality, you'll actually have access to less than that because the operating system is loading the various Windows libraries necessary to run the 32-bit application into that space too.
So, if you're trying to load a huge CSV or spreadsheet, as examples, into memory in one chunk it's possible that you will run into an out-of-memory situation. To work around this, you need to consider your use case and see if there's something you can do to "chunk" the data you need to work with. If you search the community, you'll find a few threads that discuss chunking.
Alternatively, Blue Prism v7.2, which is upcoming, will be the first release of the product where the client application will be a true 64-bit application. That will drastically increase the amount of addressable memory available to your processes.
Cheers,