Error: Apex CPU time limit exceeded

Created by Alsabana Sahubarali, Modified on Mon, 4 Nov, 2024 at 9:10 AM by Alsabana Sahubarali

You might receive the below error when making changes to a pro's payroll records in Cloud (most commonly changing or turning on a feature such as Overtime, running a payroll report with several branches, etc.):

Apex CPU time limit exceeded
Error is in expression '{!save}' in page account_settings: Class.Payroll_ManageOvertime.execute: line 321, column 1
Trigger.Account_HandleOvertimePreferenceChanges: line 50, column 1
An unexpected error has occurred. Your development organization has been notified.

The general reason a user receives this time out error is because the system is trying to load too much information. In the case of overtime, you want to make sure all of your payroll is approved and processed in Cloud (not just called in to your payroll company). There is a complex set of logic that sits behind the scenes and dictates to which paychecks payroll records are added, so if you have a large amount of unprocessed paychecks, the system is likely to time out, resulting in the above error message.

Similarly you might receive this error message when running either the Payroll Report or Payroll Verification Report in Cloud. In this case you'll want to either break out payroll by branch, or run the report with a more narrow date range.

If you have any questions regarding a specific situation, please reach out to the Help Desk!

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article