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
KevlangdoKevlangdo 

apex merge no longer working

I was merging large amount of Account records in a 24 hour period. This morning I started getting CPU limit exceeded errors. Now the Apex merge code is no longer working.
NagendraNagendra (Salesforce Developers) 
Hi Kevin,

The Maximum CPU time on the Salesforce servers - 10,000 milliseconds (Synchronous limit) 60,000 milliseconds(Asynchronous limit).

Please check below post to resolved this issue
  • http://salesforce.stackexchange.com/questions/22223/how-to-code-more-efficient-to-avoid-apex-cpu-time-limit-exceeded
  • http://salesforce.stackexchange.com/questions/47035/errorsystem-limitexception-apex-cpu-time-limit-exceeded

Also look into some of the posts on the same topic:
  • https://developer.salesforce.com/forums/?id=906F0000000BQcyIAG
  • https://developer.salesforce.com/forums/?id=906F00000009FAOIA2
  • https://developer.salesforce.com/forums/?id=906F000000094BRIAY
  • http://stackoverflow.com/questions/25126270/need-help-to-overcome-apex-cpu-time-limit-exceeded-error
  • http://www.sfdc99.com/forums/topic/system-limitexception-apex-cpu-time-limit-exceeded-error-in-trigger/
  • http://support.crmfusion.com/post/system-limitexception-apex-cpu-time-limit-exceeded-7173648
Please let us know if this helps.

Mark this as solved if it's resolved.

Thanks,
Nagendra
KevlangdoKevlangdo
Thanks. i know the governor limits, however, I was experiencing something else because I had run the same query repeatedtely for several hours merging accounts of different sales reps until I received the cpu limit warning. After re-starting the query three times, the query would no longer work. Whenever I launched it, the query would run about 1-2 seconds and stop.

The response time for every  other query that I tested , even simple selects was very long