ERR_SF_CPU on Salesforce: Salesforce Apex Trigger Fails with CPU Time Limit Exceeded. Root cause: Salesforce Apex code exceeded CPU time governor limit (10,000ms sync, 60,000ms async). Common causes: inefficient SOQL queries in loops, large data processing without batching, complex business logic in triggers, missing database indexes, recursive function calls, synchronous callouts blocking execution. Step 1: Move SOQL Queries Out of Loops. The most common cause of CPU limit errors is SOQL queries inside for loops. Bulkify your code by querying all needed records before the loop and storing them in a Map<Id, SObject> for O(1) lookup inside the loop. Step 2: Profile CPU Usage with Limits.getCpuTime(). Add Limits.getCpuTime() calls at key points in your Apex code to identify which methods consume the most CPU. Log the values to identify hotspots before they hit the governor limit. Step 3: Move Work to Asynchronous Context. Offload non-critical processing to @future methods, Queueable Apex, or Batch Apex. Asynchronous contexts have a higher CPU limit (60,000ms) and run outside the synchronous transaction, preventing the error from blocking the user. Step 4: Consolidate Triggers into a Single Handler. Multiple triggers on the same object each consume CPU independently. Merge all triggers into a single trigger that calls a TriggerHandler class. This reduces overhead and gives you full control over execution order.