Issue

 At times, one can get Out of Memory error while executing JS code activity in a workflow. 

  • A workflow is designed with a JS code activity
  • The JS code contains query to fetch records from database
  • On executing the workflow, it fails at the JS activity with error log similar to:
"Error while Compiling Script.......Out of Memory..."

Environment

All Campaign v6/v7 environments

Cause

This issue occurs when there are large number of records being fetched from database via the script. This cannot be handled by the cache memory configuration of Campaign.

Resolution

  1. Locate the serverConf.xml file under <installation directory>/conf/ path of the application server.
  2. Take a backup of this file before making the changes
  3. Locate the following line - (This value is the usual default value.)
<javaScript maxMB="64" stackSizeKB="8"/>

4. Increase the maxMB value to 128

<javaScript maxMB="128" stackSizeKB="8"/>

Note:

If this value is already set to 128 and is still giving errors, increase the value to 256.

  5. After increasing the value to the desired one, save the config file.
  6. Open terminal with superuser privileges.
  7. Go to the bin directory of installation folder that is: <install_dir>/bin/.
  8. Run the following command:

nlserver config -reload

Note:

If the instance is On Premise, the resolution steps need to be performed by customer's IT team. For Hosted customers, reach out to Customer Care.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy