function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sivapriyaa maniam sivakumarsivapriyaa maniam sivakumar 

The flow tried to update these records: null. This error occurred: LIMIT_EXCEEDED: System.LimitException: Apex CPU time limit exceeded.

Hi all,

I am facing the "Apex CPU Time Limit Exceed Error"

When i am trying to attempt the account the APEX CPU Time limit exceed error occurs.

Could you please tell me why this error occur and how to fix this issue. Please let me know if you need additional information.

Following are the flow execution report and it shows only 4 opportunity record ids. 

Flow Details
Flow Name: Assign_Strategic_AMs_on_optys_tied_to_National_accounts
Type: Workflow
Version: 6
Status: Active
Flow Interview Details
Interview Label: Assign_Strategic_AMs_on_optys_tied_to_National_accounts-6_InterviewLabel
Current User: Tirumala Kuppani (005i0000007sBmw)
Start time: 10/24/2017 11:43 PM
Duration: 1 seconds
How the Interview Started
Tirumala Kuppani (005i0000007sBmw) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = 0060H00000jhSDWQA2
myVariable_current = 0060H00000jhSDWQA2
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "10/24/2017 11:43 PM"
DECISION: myDecision
Executed this outcome: myRule_1
Outcome conditions: and
1. {!myVariable_current.Reseller__c} (null) Is null true
Logic: All conditions must be true (AND)
RECORD UPDATE: myRule_1_A1
Find all Opportunity records where:
Id Equals {!myVariable_current.Id} (0060H00000jhSDWQA2)
Update the records’ field values.
IsPrivate = false
Result
Failed to update records that meet the filter criteria.

Error Occurred: The flow tried to update these records: null. This error occurred: LIMIT_EXCEEDED: System.LimitException: Apex CPU time limit exceeded. For details, see API Exceptions.


This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange.
Flow Details
Flow Name: Assign_Strategic_AMs_on_optys_tied_to_National_accounts
Type: Workflow
Version: 6
Status: Active
Flow Interview Details
Interview Label: Assign_Strategic_AMs_on_optys_tied_to_National_accounts-6_InterviewLabel
Current User: Tirumala Kuppani (005i0000007sBmw)
Start time: 10/24/2017 11:43 PM
Duration: 1 seconds
How the Interview Started
Tirumala Kuppani (005i0000007sBmw) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = 0060H00000jhXUbQAM
myVariable_current = 0060H00000jhXUbQAM
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "10/24/2017 11:43 PM"
DECISION: myDecision
Executed this outcome: myRule_1
Outcome conditions: and
1. {!myVariable_current.Reseller__c} (null) Is null true
Logic: All conditions must be true (AND)
RECORD UPDATE: myRule_1_A1
Find all Opportunity records where:
Id Equals {!myVariable_current.Id} (0060H00000jhXUbQAM)
Update the records’ field values.
IsPrivate = false
Result
Failed to update records that meet the filter criteria.

Error Occurred: The flow tried to update these records: null. This error occurred: LIMIT_EXCEEDED: System.LimitException: Apex CPU time limit exceeded. For details, see API Exceptions.


This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange.
Flow Details
Flow Name: Assign_Strategic_AMs_on_optys_tied_to_National_accounts
Type: Workflow
Version: 6
Status: Active
Flow Interview Details
Interview Label: Assign_Strategic_AMs_on_optys_tied_to_National_accounts-6_InterviewLabel
Current User: Tirumala Kuppani (005i0000007sBmw)
Start time: 10/24/2017 11:43 PM
Duration: 1 seconds
How the Interview Started
Tirumala Kuppani (005i0000007sBmw) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = 0060H00000jhZ5HQAU
myVariable_current = 0060H00000jhZ5HQAU
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "10/24/2017 11:43 PM"
DECISION: myDecision
Executed this outcome: myRule_1
Outcome conditions: and
1. {!myVariable_current.Reseller__c} (null) Is null true
Logic: All conditions must be true (AND)
RECORD UPDATE: myRule_1_A1
Find all Opportunity records where:
Id Equals {!myVariable_current.Id} (0060H00000jhZ5HQAU)
Update the records’ field values.
IsPrivate = false
Result
Failed to update records that meet the filter criteria.

Error Occurred: The flow tried to update these records: null. This error occurred: LIMIT_EXCEEDED: System.LimitException: Apex CPU time limit exceeded. For details, see API Exceptions.


This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange.
Flow Details
Flow Name: Assign_Strategic_AMs_on_optys_tied_to_National_accounts
Type: Workflow
Version: 6
Status: Active
Flow Interview Details
Interview Label: Assign_Strategic_AMs_on_optys_tied_to_National_accounts-6_InterviewLabel
Current User: Tirumala Kuppani (005i0000007sBmw)
Start time: 10/24/2017 11:43 PM
Duration: 0 seconds
How the Interview Started
Tirumala Kuppani (005i0000007sBmw) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = 006i000000aa4TcAAI
myVariable_current = 006i000000aa4TcAAI
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "10/24/2017 11:43 PM"
DECISION: myDecision
Executed this outcome: myRule_1
Outcome conditions: and
1. {!myVariable_current.Reseller__c} (null) Is null true
Logic: All conditions must be true (AND)
RECORD UPDATE: myRule_1_A1
Find all Opportunity records where:
Id Equals {!myVariable_current.Id} (006i000000aa4TcAAI)
Update the records’ field values.
IsPrivate = false
Result
Failed to update records that meet the filter criteria.

Error Occurred: The flow tried to update these records: null. This error occurred: LIMIT_EXCEEDED: System.LimitException: Apex CPU time limit exceeded. For details, see API Exceptions.

Thanks in advance....

Regards,
Sivapriyaa M S
NagendraNagendra (Salesforce Developers) 
Hi Sivapriya,

Sorry for this issue you are encountering.

The problem is, that all operations in a single transaction count against the CPU limit -- customizations, managed packages, everything. The best way to narrow it down is to turn on the Debug Log for a user getting the error, then do the 'save' that causes the error.  Review the Debug log and you will see Profiling information about CPU time and you can see where in the transaction the time is being spent.

Hope this helps.

Kindly mark this as solved if it;s resolved.

Thanks,
Nagendra 
sivapriyaa maniam sivakumarsivapriyaa maniam sivakumar
Hi Nagendra,

Thanks for your reply... I ". I have reviewed the debug log in PROD and it contains the following errors.

WF_FLOW_ACTION_ERROR|09L0H000000kAfz|300i00000001Gya|Error executing flow: Assign_Strategic_AMs_on_optys_tied_to_National_accounts, FlowDefId: 300i00000001Gya, FlowVersionId: 3010H000000fyvE
WF_FLOW_ACTION_ERROR_DETAIL|This interview has been terminated as another interview in the same bulk execution request failed with the following error: <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow.  Please contact your system administrator for more information.

System.LimitException: Apex CPU time limit exceeded
(System Code)

FlowVersionId: 3010H000000fyvE - refer to the "Assign_Strategic_AMs_on_optys_tied_to_National_accounts"

I need to know why the "The flow tried to update these records: null." - only 4 opportunities are displayed in the Process builder error report.

Could you please tell me why this flow not updating the records and this error occurred due to Process builder or Apex trigger.

Please let me know if you need any information.....

Thanks 
Sivapriyaa M S