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
Derrick EjanDerrick Ejan 

Apex Cpu Time Limit exceeded on deployment

Hello All.  I am getting the CPU time limit exception during my deployment to production.  However,  I can't replicate this error in my sandbox environment.  On average I am getting the cpu time below but on Deploy is says im over the limit. I could refactor it more but just curious as why this will not deploy if it shows under the limit in my sandbox?

  Maximum CPU time: 6595 out of 10000 ******* CLOSE TO LIMIT
Best Answer chosen by Derrick Ejan
NagendraNagendra (Salesforce Developers) 
Hi Derrick,

Here is an article from Salesforce on how you can address this Apex CPU time limit exceeded error with best practices. Hope this helps.

Please mark this as solved if it's resolved.

Thanks,
Nagendra