I have specified the query limit as 210 records for which the CPU time limit shows as 14195ms but the maximum CPU time limit seems to be 10000ms in debug log.

enter image description here

Maximum CPU time : 14195 out of 10000 **** CLOSE TO LIMIT. How is it possible? Any Idea?

But still the page did not break.


1 Answer 1


A while back, Salesforce made the CPU governor limit a little bit softer.

If the demand on your pod (na3, cs14, eu1, etc...) is not particularly high at the time when you are executing some transaction, Salesforce may allow you to go over the 10,000 CPU time limit.

10,000 is still the governor limit, and Salesforce can cut any transaction off after that point if they feel the need to.

Will try to find a reference in the docs.


I wasn't able to find anything regarding this in the docs, release notes, or the Salesforce engineering blog.

It looks like this question is a duplicate. sfdcfox has a great explanation in this answer.

An excerpt from the answer I linked:

The system has the right to terminate any process that run longer than 10,000 ms in execution time, but it does not have the responsibility to do so. This means that during peak loads, your code might crash at 10,001 ms because the system needs to keep resources available for contending processes, but it might happily run to completion during the midnight hours or on weekends.

During non-peak times, you might be allowed to run 15k, 20k or more-- I've never seen an official absolute maximum, although I'm a bit surprised by the 24.7k, and the highest I've seen in production is about 15k. Unlike other governor limits, like DML rows or SOQL queries, the 10k ms limit is more of a suggestion than a hard stop. You are guaranteed a minimum time, 10k ms, so your code won't crash because it was at 9,999 ms. But it may or may not crash at 10,001 ms if the system needs the resources.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .