The process was terminated due to an System.OutOfMemoryException

studio

#1

hello

i have a problem want you to help.

when the attached process was Executed, the system out of memory Exception error will occur while the used memory exceeds 1 GB,and than Processing end.
Is this 1GB Restriction just like a kind of UI Path specification?
Can i change this 1GB Restriction to 2GB?

the enviroment i am using is as bellow.|
OS :Windows 10 64bit
Memory:8 GB

thank you.Main.xaml (11.5 KB)


#2

Hi @ovi , Could you please advise on this.


#3

Could you please try to restart system and try again.
Also please advise what operations exactly u r trying to perform which causes this error .

Does this happen when u run one specific BOT or does this happen every time u run any process.

Any screen shot of activity which throws this error .


#4

Thank you for reply.

this exception happen every time i run attachment work flow.

Exception Dialog is like this.
image

This is an activity which occurred Exception.


#5

Hi there,

Sorry for the late reply.

There are several posts here suggesting to increase the value of maxReceivedMessageSize parameter in %localappdata%\UiPath\app-17.1.6522\UiRobot.exe.config.


Error while starting job from orchestrator API
#6

What’s on the right hand side of that assign activity? (the one that starts with new String("a"c ).


#7

Assign activity is like this.
targetString = new String("a"c,counter)
※counter is loop counter.(The range : 1 to Integer.MaxValue)


#8

Thank you for reply.

I’ll try it.


#9

You’re creating much more than that - check your variables on the most inner scope. With each loop you’re allocating massive amounts of memory.

If you clean that, you’ll get results similar to this:

Start
0000000000,6734128
0000000001,6766168
0000000001,6790460
0000000010,6806676
0000000010,6814184
0000000100,6830552
0000000100,6846936
0000001000,6871420
0000001000,6886968
0000010000,6927280
0000010000,6942564
0000100000,7158964
0000100000,7174248
0001000000,9190664
0001000000,9214360
0010000000,29230776
0010000000,29244960
0100000000,222041872
0100000000,222060256

What’s the purpose of that workflow outside of frying CPU’s? I don’t see the point.

Even if it wouldn’t throw a SystemOutOfMemory (which it will 100% of the time, UiStudio is 32-bit), the Int32 counter will overflow, as Int32.MaxValue is not a factor of 10.


#10

thank you for trying my workflow.

I wanted to know the available memory size of UI Path Robot so, I made this workflow.
Because Robot works with 32 bit, I think that 2 GB of memory is available.
However, in fact, Exception occurred at a place exceeding 1 GB.

I thought that the constraint of UI Path is related to this result and asked a question.


#11

By changing the log level from verbose to error it was possible to achieve the expected behavior.
It seems that this workflow was using a lot of memory when outputting to the log.

thank you for your cooperation.