Layer7 API Management

 View Only
  • 1.  Error message "JSON string exceeds heap size limit"

    Posted Feb 27, 2024 12:27 AM

    We are running API v11.CR1. We are querying an application that returns a JSON array of 250+ entries, each entry containing 400 attributes.

    When the result set goes over that number we get the following error message:

    "errorCode":"APEX_ERROR","message":"System.LimitException: JSON string exceeds heap size limit\n\n(System Code)\nClass.RestRoute.execute: line 50, column 1\nClass.DWS_DataExportApi.BaseApi.executeWithErrorLogging: line 530, column 1\nClass.DWS_DataExportApi.handleRequest: line 197, column 1\nClass.DWS_DataExportApi.handleGet: line 166, column 1"

    Questions:

    1. What is that heap size limit that is mentioned?
    2. Is there any way to alter that limit, if yes how, and what is the impact?
    3. Apart from limiting the result set, or trimming down the number of attributes, what option do I have to bypass or lift that limit? 

    Thank you

    Laurent LANDREAU

    Integration Architect, Brisbane, Australia



  • 2.  RE: Error message "JSON string exceeds heap size limit"

    Broadcom Employee
    Posted Feb 28, 2024 02:59 PM

    Hello Laurent,

    Please open a support case to receive help for this problem.

    Thanks,



    ------------------------------
    Ben Urbanski
    Product Manager, API Gateway
    Layer7 API Management
    ------------------------------



  • 3.  RE: Error message "JSON string exceeds heap size limit"

    Broadcom Employee
    Posted Feb 29, 2024 01:15 AM

    @Laurent LANDREAU

    Looking at the error message, I think, it was not from the gateway, but from the backend service due to routing. Could you please be more specific about:

    • is this error observed from one of JSON specific assertions?
    • is this error observed from the SSG logs?
    • is this an error response from the backend services?




  • 4.  RE: Error message "JSON string exceeds heap size limit"

    Posted Feb 29, 2024 01:23 AM

    You are right, the error comes from the source application. Please ignore.




  • 5.  RE: Error message "JSON string exceeds heap size limit"

    Posted Feb 29, 2024 01:30 PM

    Hi, Modify CWP io.XMLPartMaxsize, assertion helps size increase in response, test