Skip to main content

Troubleshooting LimitExceptions

This guide explains how to troubleshoot LimitExceptions, such as:

System.AsyncException: System.LimitException: Apex heap size too large: 12000970 External entry point (valence)

Step 1: Verify Setup and Resolve Mapping Errors

  1. Ensure you are running the latest version of Valence.
  2. Review the failed run for any mapping errors (e.g., missing lookups, validation rule violations).
  3. Resolve all mapping errors before proceeding.
note

Make sure to check for and resolve any new mapping errors after each test run in the following steps.

Step 2: Determine the Maximum Batch Size

  1. Open the link's source adapter settings page.
  2. Set "Max Pages" to 1. Max Pages
  3. Open the link's link settings page.
  4. Set "Batch Size" to 100. Batch Size
  5. Run the link.
  6. Check for and resolve any mapping errors.
  7. If successful, double the batch size and repeat steps 5-6.
  8. Continue increasing the batch size until you encounter an Apex Heap or CPQ limit error.
  9. Set the final batch size to 80% of the size that caused the error.
  10. Remove the batch size limit and test if the heap size error still occurs, or if the problem is solved at this point.

Step 3: Determine the Maximum Page Size (if needed)

If the heap size error persists:

  1. Open the link's source adapter settings page.
  2. Set "Max Pages" to 100 and run the link. Max Pages
  3. Check for and resolve any mapping errors.
  4. If successful, set "Max Pages" to 250.
  5. Double the "Max Pages" value until you encounter the heap size error again.
  6. The last successful value is your maximum page count.

Step 4: Perform Initial Load in Manual Batches

Once you've determined the maximum page size:

  1. Set "Start Page" equal to the previously determined Max Pages.
  2. Run the link.
  3. Check for and resolve any mapping errors.
  4. Increment "Start Page" by the Max Pages value.
  5. Repeat steps 2-4 until the initial load is complete.
note

This process may require multiple manual runs to complete the initial load.