0

I am running a save routine hundreds of times a day saving modifications to large files to a google Drive folder.

Once a day roughly I get this error: 5/15/2022, 12:06:55 PM: Exception: Service error: Drive

It doesn't matter if I try to delete and resave the files or if I select the files and use setContent to alter their contents. I still get this error once in a while.

I am running this activity through a web app and external trigger so it's possible that the script could be run more than once simultaneously but I protect against that eventuality using a lock, so it should not be the case.

Has anyone experienced this before? Was it a quota issue or something intermittent?

Rubén
  • 34,714
  • 9
  • 70
  • 166
michaeldon
  • 507
  • 3
  • 11
  • I find that "Service errors" can happen intermittently on any script, with no apparent reason or pattern. You can catch and handle them, possibly retrying the operation (using exponential backoff often helps), or if you're running on some sort of trigger, flag the operation for re-attempt on the next trigger execution. – Aaron Dunigan AtLee May 18 '22 at 15:01
  • Hi Aaron. Yes I used try catch to locate the error, but I was avoiding handling that exception until I understood better why it was happening. – michaeldon May 18 '22 at 20:16

0 Answers0