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..."
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.
- Locate the serverConf.xml file under <installation directory>/conf/ path of the application server.
- Take a backup of this file before making the changes
- Locate the following line - (This value is the usual default value.)
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
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.