We used to get this error when we were using lots of collections in our process flow. Blue prism loads and holds the the data from collection in runtime memory. And results in this error. You can clear the collection data once it's processed. Hope this helps.
Yes, we use to get this error when automatic.exe file increase the size by loading all the collection data into the system.
We can overcome this issue by upgrading the machine ram or before the action that ur getting this exception we can use clear garbage. O hope this helps you