UiPath Out of Memory

@Fekke can you please share your XAML ? please… it will be greatly helpful.


Just a sidenote - amount of RAM on the machine is not that relevant anymore. As long as it’s a 32bit process, 2GB is the limit of memory it can use due to address space, hence Fekke’s question about 64bit version is on point.

InvokeWorkflow by itself doesn’t help much if you’re going through them all anyway (it’s good to split long workflows, just that isn’t a definite answer to this issue). Testing in isolation on the other hand does help - if each workflow file (or at least a set of them) can be tested separately.

@Fekke This is definitely a breaking issue.
By quick check looks like an overloaded debug preview and/or logger communication (when using debug, it logs InArgument and OutArgument values, as well as for String displays the value inside Studio).
I’ve checked with two files that I had on hand (~45k lines and 1,1k lines) and it just errors out with zero info whatsoever.

Message: Job Test7 stopped due to unexpected process termination! Exception Type: Exception System.Exception: Job Test7 stopped due to unexpected process termination!

Changing String to String and putting the output of read to element 0 (to make debug not try to display value in Studio, since it doesn’t display array content) still crashes, so I think that logger communication is more likely the cause (also see the workaround as confirmation).

There is a quick and very dirty workaround for the debug issue - make it not log the arguments, by adding one of the excludedData keywords to the name of the activity.
These can be found and changed in project.json in project root location. So f.e. instead of “Read file” name it “Private: Read file”. That way arguments will not be logged and it should not crash.

For the ForEach error unfortunately I don’t have a good guess for at least a workaround, as running with ~15k matches (foreach with a writeline(match.index.tostring)) didn’t throw, so couldn’t reproduce (admittedly the Regex in my test was very simple, but I’m not sure if that’s even a factor).

Edit: Ok, it didn’t throw, but hanged the Studio due to probably console overload, requiring a kill. Still annoying, but unrelated.



The Regex i’m running is:


In a document with about 1300 lines with 256 chars on every line.

The Regex matches on average on 99.9% of the lines and returns 3 values for a valid match.

The foreach seems to die when adding the three values from n row to a datatable, but it still throws the wired error instead.

Your are right @andrzej.kniola
We’re using 64-bit OS, but the UiPath application is installed as a 32-bit application.
We didn´t realized that until now.

Does UiPath Studio have a 64bit version? (I couldn’t find this answer searching the website)

Unfortunately it does not. But in all fairness it really shouldn’t waste as much memory as it does. You could try to manually do a large memory address aware hack, but I think it would be smarter to optimize your code and wait for the developers to fix theirs. :slight_smile:

Does UiPath Studio have a 64bit version? (I couldn’t find this answer searching the website)

It had a 64bit version but that got us into some bigger problems. Since most applications automated by UiPath are 32bit the interprocess communication would slow the execution a lot. Therefore we decided to stay on 32.

I understand that sometimes debug can be annoying and we’ll try to improve.
This issue needs to be investigated. We’ll need some repro steps here.

The workarounds I’m using:

  • split workflows in individual pieces
  • invoke them separately for testing purposes (default arguments)
  • use Log Message - level Trace

Veris_Comp_Read_PBS_Error_Code.xaml (75.4 KB)

Here is the current component. Since it’s task is rather tiny it is something we invoke in a larger workflow, even though the workflow attached yields the issues descriped on it’s own.

My two cents -
Breaking the entire flow into multiple logical small workflows with the Isolate flag is the key. Assuming that the machine you are using meets the hardware and software requirements and no antivirus is interfering with the Robot

  1. Review the logs to check if the workflow is always crashing at a specific place in the workflow. This will help you get to the cause
  2. Pass only the relevant data between workflows as arguments, like if you need only few values from a data table only pass them as opposed to the entire data table
  3. Review if the affected sub-workflow has optimum usage of variables and there is no case of infinite looping
  4. Review if any other application which the bot is interacting with is increasing the memory usage thereby affecting the bot. You can view the windows event logs for it.



Can you elaborate a bit on the functionality of the Isolate flag on the workflow invokation activity?
I would much like to have a clue what it actually does since Google had no answers…

Isolated flag will make the underlying workflow be launched as a completely separate process (you can check with procexp and you’ll see a separate UiRobot.exe with /executor in cmdline).

This has some advantages:

  1. Separate memory address space.
  2. Better ability to recover from crashes (f.e. this was the recommended calling way for MODI OCR since it’s not 100% stable).

But there are also drawbacks:

  1. All arguments will need to be serialized (using JSON serialization). Non-serializable arguments will throw on this and some types (f.e. DataTable) can sometimes produce weird results.
  2. It’s a little bit slower due to serialization and process startup times.
  3. Some large objects as arguments (f.e. datatables >300kB) had some issues due to pipe write limit (don’t remember the details exactly, just keep in mind that large arguments may be an issue when they previously weren’t).

In practice it’s similar to suspending current robot, spinning up a new one, doing work with it, and pushing the results back to the main one.



Hi Thiago,

If the workflows are old and not split in multiple files, this may happen due to all the images that are stored in the file itself. This has been fixed by storing the images separately, in a .screenshot folder. I would recommend you either to remove all informative screenshots from the file, and then re-add them if you’d like.


@Fekke UiRobot is the application in charge of executing workflows created with UiPath Studio. UiPath Studio communicates with UiRobot through a WCF service that is hosted by default on named pipes.
By default, the maxReceivedMessageSize of the named pipes binding is 65,536.

When you debug a workflow, the values of all available variables and arguments are also sent. This may increase the size of the message and make the communication channel faulted. When this happens, studio may no longer be able to communicate with the robot. I guess this might be the reason you are receiving the communication object faulted exception.

Can you try increasing this value, in UiRobot.exe.config for both DefaultDuplexEndpoint and ExecutorEndpoint and let us know if you see any change?



Communication exception…this is a common issue to us…not sure why this error comes out nowhere…

It seems like a defect to me.

My server config : 64 bit processor
Ram : 16 GB

Can anyone help pls ?

I got the same problem and can easily reproduce the error… It happens when the a variable gets bigger than 22kB which is small, specially when you use files of http get.

Debugging fails but running normally works. I tried changing the maxReceivedMessageSize in the UiRobot.exe.config and Studio.exe.config
Main.xaml (5.9 KB)


any feedback from UIPath, its been a while

you can also check these posts:

Iam facing a completly different issue. My workflow runs perfectly fine, but if i leave the workflow for some days.
All click activities gives me exception saying Uipath core element exception, the selector is completly working fine just few days back and now it gives exception, I need to change all the activities again.
Can anyone help me with this.
This is consuming a lot of time for me, doing all the things again.

Thanks & Regads

We will need more details, maybe a separate thread for your issue.

I had this problem is about log output but the memory couldn’t save, so memory out of. because the code had a loop, it will keep out the log in memory . I hope it can help you