Visualforce Remoting Exception: Apex CPU time limit exceeded

  • 1
  • Question
  • Updated 1 year ago
  • Answered
Just curious if anyone's run into this error before?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Is there a way that I can call .save() on a model that will make sequential save calls, so I don't run into these time limits?

I have a model where 6000+ rows have changes... Any way to just save some rows? and then save some more?
Photo of Oliver Sinfield

Oliver Sinfield

  • 922 Points 500 badge 2x thumb
Did you ever figure out how to perform model saves in a partial or sequential manner?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
No.

Instead of changing all 6000+ rows at once, we just change a few, save, query again, change, save, etc...
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
I believe that is the error I got on an Apex Async Job that brought in data from an external data source.
We broke the job into three separate jobs and it fixed the problem (as I remember). That obviously doesn't help you with Skuid. Sorry...