Reset CPU limit in between 200-item batch chunks
Last updated 2022-02-10 ·Reference W-2050118 ·Reported By 6 users
Summary
When uploading a huge volume of data with batch size more than 200, the apex CPU limit does not reset for each chunk of data and hit APEX CPU limit during the transaction.
Repro
- Create a Trigger, Validation rule and Workflow.
- Upload a huge volume set of data with the feature of BULK api.
- Specify the batch size of 10,000.
- When uploading the data, the trigger works with 200 records as one chunk.
- From the debug log of processing 10,000 records each time, the apex CPU limit does not reset for each chunk.
- The process hit APEX CPU limit.
Workaround
- Use a smaller batch size such as 1000 or 2000.
- Use SOAP API instead of BULK API.
Reported By (6)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.