#SalesforceWinter27 [Tip 10] - Apex Heap Limits Just Went Up to 10 MB and 25 MB

Every Apex developer has met this one: System.LimitException: Apex heap size too large. Usually at the worst possible moment, in the middle of a bulk job.

In Winter '27, the ceiling moves.

  • Synchronous transactions go from 6 MB to 10 MB.

  • Asynchronous transactions go from 12 MB to 25 MB.

There is nothing to enable. The new limits switch on automatically in every org according to the Winter '27 release schedule, in all editions that run custom or managed Apex.

Product Area: Apex

To confirm what your org is running, execute this in the Developer Console:

System.debug('Heap limit: ' + Limits.getLimitHeapSize());

There is one catch worth knowing about if you build in a Winter '27 sandbox and deploy to a Summer '26 production org. Your sandbox has more headroom than production does, so code that passes there can still blow up when it lands.

Salesforce has given you a switch for exactly this. In a sandbox, Developer Edition, or scratch org, go to Setup, enter Apex Settings in the Quick Find box, and select "Enforce the Summer '26 Apex heap limit". Your non-production org drops back to the old limits, and you can verify your transactions will survive in production.

That setting is available only in Winter '27 nonproduction orgs. From Spring '27, the higher limits are enforced globally whether the box is ticked or not.

References & Useful URLs

  • For Related Winter '27 Release Note Article – Click Here




Found this useful? Hit like, and drop a comment — I read every one, and your feedback decides which tips make the list.