🧪 Experimental KB — Official knowledge hub: community.kaptio.com

Heap Size Error When Merging Amendments

When attempting to merge an amendment back to the primary booking, the operation fails with the error: 'System.LimitException: Apex heap size too large: 20712887 External entry point (KaptioTravel)'.

amendments heap-size merge-error governor-limits apex-limits

Problem

When attempting to merge an amendment back to the primary booking, the operation fails with the error: ‘System.LimitException: Apex heap size too large: 20712887 External entry point (KaptioTravel)’. This typically occurs with complex bookings containing many itinerary items, passengers, or services.

What We Found

The amendment merge process creates a snapshot of the booking which can exceed Salesforce’s Apex heap size governor limit (12MB for synchronous operations) when the booking has extensive data. This was a known platform limitation tracked under engineering ticket KT-10364/CEE-27.

Solution

  1. If the error occurs, check the Amendment Log records for the specific error details
  2. As a workaround: Reject the failed amendment
  3. Apply the desired changes directly to the primary booking instead of using the amendment workflow
  4. For permanent resolution: Verify the customer’s Kaptio package version - the fix was deployed in Fiji version 20.2.2
  5. If customer is on an older version, recommend package upgrade to resolve the issue permanently

Notes

  • This issue primarily affects bookings with large numbers of itinerary items, passengers, or services
  • The fix in Fiji 20.2.2 optimized the snapshot creation process to reduce heap usage
  • Some customers have disabled amendments entirely due to other limitations (e.g., flights not supported in amendments)

Warnings

⚠️ Until upgraded to Fiji 20.2.2+, customers may encounter this error on complex bookings ⚠️ Rejecting an amendment will discard all changes made in that amendment - ensure customer understands they must reapply changes manually


Source: KHELP-11173

Was this article helpful?