JavaScript code error: “allocation size overflow”


Allocation size overflow error in JavaScript

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

E.g., when you execute delivery to LINE with 30K recipients and call Post-processing to generate the file to LINE, the JS code that reads the file to variables throws an error:

“allocation size overflow”


How to resolve this error?

This error can be resolved in two ways:

  1. You can raise the memory allocated in the serverConf.xml:

    !-- 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="8"/

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

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

  2. Use something like 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 and not if the count goes beyond a specific value.

On this page