Salesforce imposes a limit on the CPU usage that can be consumed in a given transaction, which is approximately 10 seconds for Synchronous, 60 seconds for Asynchronous Apex. An Apex CPU Timeout Exception effectively means that Apex Code (or process builder/ flows or both) is attempting to execute and is exceeding the cpu time limit. Any DML executions contained within the transaction will be rolled back if the limit is hit.
The Signature Success plan's Proactive Monitoring product will monitor for, and alert you to, high error volumes of this type. This article outlines some scenarios to help you investigate should you receive an alert. In addition, on the Salesforce Help site Designated contacts and above can see your realtime metrics, alerts & more.
If you receive the following error message, your organization may be hitting the timeout limit for transactions based on CPU usage.
Full Message Error Text:
Causes
When the limit is exceeded, transactions from APEX classes will encounter this exception. This alert provides visibility into when these errors are occurring for a customer so that corrective actions can be taken.
Errors of this nature can often be introduced by:
Here are some common practices & resources that may help to resolve this error.
Process Builder:
Where viable, convert Process Builder processes to Apex Triggers using an asynchronous approach if possible.
Managed Package involvement:
If code from a managed package (i.e. Rollup Helper) is taking part in a transaction such as Posting a Billing you will need to contact the authors of that package.
Custom Code:
If you have custom code (i.e. trigger) you will need to contact your developer or responsible organization to refactor your current custom solutions to ensure you do not exceed the CPU time limit.This article includes suggested approaches to mitigate the CPU time limit exceeded issue.
Batch Processing:
If you are inserting or updating a large number of records, try reducing the batch size.
Async Apex:
Use @future calls and asynchronous processing to move non-critical business logic out of triggers and/or Process Builder processes.
Annual Technical Health Review:
Audit the Apex code you're running to ensure it is efficient. If you have not availed of your annual Signature ATHR, this may help in identifying where best practices are not being followed.
Best Practices:
Consider Salesforce best practices for Triggers and Bulk Requests
000389177

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.