I have a public add-on that utilises Google Apps Script Lock Service to prevent reading a spreadsheet before writes are made.
var lock = LockService.getDocumentLock();
var success = lock.tryLock(240000); // 4 minutes
if (!success) {
console.warn('Could not obtain lock after 4 minutes.');
return;
}
//perform some function then release lock
lock.releaseLock();
I continue to receive the error message:
There are too many LockService operations against the same script.
Originally I thought this error was 'user based' and there was potentially a quota against the number of Lock Service operations per user, however I recently started seeing it appear more often against 30+ users in the past few days.
- Is there a limit to the number of LockService operations per user or per script?
- If so, what is the limit?
I don't see any reference to a quota within Google Apps Script quotas
Nor do I see any reference to a quota within the LockService documentation