Loading

Best Practices and Guidance for "Apex CPU time limit exceeded" in Data Mapper

Date de publication: Sep 27, 2024
Description

"Apex CPU time limit exceeded" occurs in Data Mappers if the transaction exceeds the governor limits. Governor Limits will get hit because of the amount of time processing done. There is not a guarantee that "X" number records will be able to be processed under the CPU Governor limit.

When configuring a LIMIT filter setting under the Data Mapper, the maximum number of records returned within the allowed values from 1 to 2000, there is NOT a guarantee that the  limit amount of records will be able to be processed under the specified limit. Utilizing a LIMIT of 2000 would ensure that the Data Mapper would not hit the governor limit, however, there will be some scenarios where the Data Mapper can process above 2000 records before hitting the Governor Limit error. The 2000 limit is a "safe" limit.

The CPU Governor limitation is the amount of CPU time required to retrieve records. The CPU Time is affected by number of fields, number of records, query parameters, etc. This is not specifically to a limit on the number of records, but rather the amount of time spent processing any set of records.

Résolution


Refer to the following Best Practices and Guidance articles to help resolve "Apex CPU time limit exceeded" in Data Mapper:
 

OFFSEThttps://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_offset.htm
Workaround for offset 2000 limit on SOQL queryhttps://help.salesforce.com/s/articleView?id=000339353&type=1

'Apex CPU Time Limit Exceeded' error in Salesforce CPQ

https://help.salesforce.com/s/articleView?id=000383156&type=1
Code more efficiently to avoid 'Apex CPU time limit exceededhttps://help.salesforce.com/s/articleView?id=000339361&type=1
Numéro d’article de la base de connaissances

000390580

 
Chargement
Salesforce Help | Article