Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Script stack space quota is exhausted

Avatar

Community Advisor

Hi,

 

in serverConf.xml Javascript memory is raised to 512 MB. I have got the following error Script stack space quota is exhausted when executed JS below which is exporting several "big" workflows into a zip file. File is large around 8 MB when error is shown.

milanv69354962_0-1579089506627.png

I would say that MemoryBuffer cannot handle more data and breaks. Is there a way to extend it?

 

Regards,

Milan

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Milan,

 

You have to increase the stackSizeKB to at least 1024 KB.

 

Go to your server configuration and do the following 

<!-- Configuring the JavaScript interpreter

         maxMB :  Maximum size in megabytes before running the garbage collector Default: 64

         stackSizeKB :  Size of each stack chunk in kilo octets Default: 8 -->

    <javaScript maxMB="512" stackSizeKB="1024"/>

 

Do check with support if hardware support 1024 at stack size.

 

What Are the Side Effects of Raising the Stack?

Raising the default system stack size by definition allows for larger stack segments for every process on the system. If swap space on the system is near capacity, raising this tunable will increase the amount of swap that is reserved for each process. This would allow a process with a memory leak, or written to use a great deal of memory, to reserve more swap, and possibly exhaust the swap space on the system.

 

Regards,

Amit

View solution in original post

3 Replies

Avatar

Community Advisor

Hi,

 

512 mb is way too high for the js interpreter. Have you tried shelling out with execCommand('nlserver package ...')?

 

Thanks,

-Jon

Avatar

Correct answer by
Level 10

Hi Milan,

 

You have to increase the stackSizeKB to at least 1024 KB.

 

Go to your server configuration and do the following 

<!-- Configuring the JavaScript interpreter

         maxMB :  Maximum size in megabytes before running the garbage collector Default: 64

         stackSizeKB :  Size of each stack chunk in kilo octets Default: 8 -->

    <javaScript maxMB="512" stackSizeKB="1024"/>

 

Do check with support if hardware support 1024 at stack size.

 

What Are the Side Effects of Raising the Stack?

Raising the default system stack size by definition allows for larger stack segments for every process on the system. If swap space on the system is near capacity, raising this tunable will increase the amount of swap that is reserved for each process. This would allow a process with a memory leak, or written to use a great deal of memory, to reserve more swap, and possibly exhaust the swap space on the system.

 

Regards,

Amit

Avatar

Community Advisor

Hi @Amit_Kumar 

 

thank you, this is helpful.

I am trying as well to import XML package (campaign with several workflows) which is heavy around 50MB. Rich client is crashed every time. Tried to upload package on the server and run command: nlserver -import:package.xml but do not work as well.

 

Anly clue?

 

Regards,

Milan