JavaScript code error: “allocation size overflow”

This article provides resolution to the issue where the JavaScript code under Campaign Classic shows as “allocation size overflow”

Description description

Environment

Campaign Classic

Issue/Symptoms

Allocation size overflow error in JavaScript

This is a type of memory issue where the memory allocated for each query in JavaScript trying to access the database goes beyond the limit set in the server configuration file.


E.g.: When one executes a delivery to a LINE with 30 thousand recipients and call the post-processing to generate the file to LINE, the JavaScript code that reads the file to variables throws an error: allocation size overflow

Resolution resolution

This error can be resolved in two ways:

  • Raise the memory allocated in the serverConf.xml:
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="8"

/>

*          Note: For the Hosted server, the Adobe TechOps team would perform this task. For On-Premise, the concerned have to make the changes on their own.*

(Tip: Iincreasing JavaScript from 64MB to 512MB is needed for custom and complex reports on large tables)

  • Use linecount=<no of records to retrieve> or noLineCount =true, when creating the query def.

It would look like < queryDef schema=schemaName operation= Select lineCount= 100000 or noLineCount=true
                 However, the above option may work for some counts only and not if the count goes beyond a specific value.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f