...
CPU Time Limit in TAPSS-891
What is a CPU timeout error? Salesforce limits CPU usage to 10 seconds for synchronous transactions and 60 seconds for asynchronous transactions. Seeing the error “Apex CPU time limit exceeded” means your transaction is taking too long and can't be completed. Salesforce platform imposes a CPU usage governor limit to any given execution context, which is approximately 10 seconds. It means that Apex Code, declarative tools or a combination in a transaction, must not exceed a ~10-second limit. It is non-negotiable. This means we cannot increase the 10-second threshold by tweaking settings, buying more allocations from Salesforce or work around it by other means. It is an absolute hard limit.
...
Current Batch class by AQ (Managed packaged), code is hidden, thus, we cannot control the default size of the batch which is 10
There are Process Builder and Flow by AQ which design are also hidden:
Contact Default CAE Category
tbc--
One Usyd flow that were disabled to isolate testing
USYD_Transactions_afterInsertUpdate
...
SIMULATIONS/REPLICATIONS DONE:
...
Created Batch record with Batch items and transaction records comparable to original related Production record.
Closed batch and received error on Utility Log (CPU limit not indicated on Details as UAT has different AQ package version).
Close the batch record using anonymous Apex scriptvia execute anonymous in developer console
Code Block |
---|
String smartBatchId = 'a0ZBm000000AdT7MAK'; AQB.ProcessBatchItems aqSmartBatch = new AQB.ProcessBatchItems(smartBatchId); Database.executeBatch(aqSmartBatch, 1); |
...
5. Batch Record was closed successfully
...
CONCLUSION & RECOMMENDATION
The CPU time limit is a known error from Affinaquest as they don't have a configuration to adjust the Batch Size. This is still encountered during the test in RommelTest sandbox (Affinaquest version 24)
Completed Testing in SIT: SIT Testing Result
Open Items for Testing: TAP-1200/1222/1219 Issues Unit Testing
Bug in Join utility which blocks accounts being joined
Recommendation:
Do not deploy the optimization as part of May R2 Release since it’s not fully tested in SIT. MS team and Yeng Sembrano will get more information from Affinaquest about how the batch process works on the background so we can do a Customized
Close Batch button that can be run whenever CPU time limit happens in PROD as an interim fix.