Is there a Google Apps Script quotas dashboard? - google-apps-script

Does Google offer any type of dashboard which shows which scripts are using the most amount of computer time? I've been getting a lot of notices lately that I'm exceeding my computer time quota. I'm making adjustments where I can but it's difficult to know where I can tweak things without some type of dashboard showing me where my quota is being used.

There are a few ways to check quotas. Some of the service APIs may have methods (like MailApp's getRemainingDailyQuota). You can also check the Quotas page from your Developer's Console. Sometimes you get quota errors that are unclear but there is a reference page that clarifies some of them.

Related

Bandwidth Quota for Google Apps Script

This morning we got a couple of errors from Google Apps script saying:
Exception: Bandwidth quota exceeded...
Try reducing the rate of data transfer.
Our Google Apps Script (GAS) programs mainly look at Gmail, do some processing, access Google Maps some, and transfer data back and forth between GAS/GCP and an app hosted on another platform.
However, accessing Gmail doesn't seem to be what this is talking about. "Bandwidth quota" would seem to indicate too much data is being transferred into and out of the Google servers via Google Apps Script. We do transfer a fair amount of data back and forth to an app hosted on another platform on the Internet, such as Amazon Web Services.
However, we don't see that there is a "Bandwidth quota" on the Google Services Quotas page. AND around the time we got this error this morning, we weren't accessing Gmail nor transferring data back and forth outside of GCP any more than usual. Probably less.
Does anyone know what this quota is, where we can find it, and how we can possibly bump it up, even if we need to pay for it?
I looked at our Google Cloud Platform (CCP) Console Quotas (https://console.cloud.google.com/iam-admin/quotas) and we are well below any usage limit, and see none that are about a "Bandwidth Quota".
Thank you!
UPDATE 29 March 2022 - After more than a month of having zero of these messages, this evening we are seeing at least 10 of them. Some facts:
The "bandwidth quota exceeded" errors are only happening when calling the APIs for one particular external app hosted on AWS-like servers. They do not occur when calling drive, maps, etc. or any other APIs.
Today has been a lower-volume day & evening for our app than many are. So, this makes no sense why we would get these errors this evening and not other days.

Re-authorize hundreds Google scripts indefinitely

I have about 700 Google sheets, running scripts.
For too many years now, I have to re-authorize these scripts indefinitely.
Of course, I searched the net, I simplified my scripts to minimize the number of services called. Recently, I was hoping that the Google Alpha V8 script could have helped me, but no, definitely no. Still no solution.
My hundreds of sheets are opened by the employees of my company, therefore hundreds of scripts linked to these sheets are automatically used thanks to triggers (simple and installable triger)
It seems obvious that there is a limitation on the number of scripts allowed at the same time. This limitation having been visibly reached for years, I have to re-authorize, every day, some scripts. But by doing this, I guess I am revoking so many other scripts. How Google decides to revoke this or that script, I don't know. I guess the least used.
Why this limitation? Is it possible to increase it?
If not, what is the solution?
I add I found this page https://developers.google.com/apps-script/guides/services/authorization , which is talking about OAuth application user limits (at the very bottom of the page) . I wonder if this could help me.
Thank you.
I worked on my topic, reading a lot of english docs... I painly read and slowly understood them. I hope so !
As I could expected, I hit on restrictions, placed by my organization, I imagine. I am unable to create project. See 1
In the same time, and strangely, I own several projects. 2. I don't know why they exist, even if I recognize their names which are those of several of my scripts.
Anyway if I want to publish my script as an Add-on, I have to "link" my script to a "standard GCP project".
As it is impossible to create specific projects, I tried to follow a google procedure, consisting to link my script to an existing project. But as it was expected, it does not work either 3
If someone had a good suggestion, it would be welcome.
Thx.
JM.
Convert your scripts to an add-on. Then these add-ons can be shared across users and spreadsheets, and you can actually reduce the number of places you need to maintain code. You can view the publishing guide here: https://developers.google.com/gsuite/add-ons/how-tos/publishing-editor-addons
A second solution is to create a standard Google Cloud Platform project and change (some/all of) your scripts to use it, rather than their own hidden GCP project. More info about this step: https://developers.google.com/apps-script/guides/cloud-platform-projects
Note that both of these solutions will result in sharing of certain quota limits, which may mean you need to redesign or update how you do things
However, both of these changes provide increased visibility into the errors that your scripts encounter, as you no longer have 700+ places to check for error reports, just a 1 or a handful.

Google Cloud Vision API from Google Apps Script?

I've been accessing the Google Cloud Vision API from a script in a Google Sheet using UrlFetch and the REST API.
Until I got "UrlFetch failed because too much upload bandwidth was used" I didn't even know there was a quota on UrlFetch!
Is the a way to access Google Cloud APIs from a Google Apps Script so I can dodge the quota?
Quotas protect the users of Google services by preventing unforeseen spikes in usage, on the benefit of both the user (who might get unexpected bills if the quota is related to a payed resource) and the community (who will have more resourcesa available, as they will not be monopolized by users that are making an excesive use of them).
That is the reason why quotas cannot be exceeded, although depending on the service (and specific quota) you are using, you may be able to request a quota increase by following the documented procedure or contacting the support team of the product in use.
Finally, in order to identify which is the quota that you are currently hitting, refer to this documentation page where you will be able to find the quotas for URL Fetch, which as of February 2018 are:
As a side note, you have to take into account that these quotas are refreshed at the end of a 24-hour window, so your quota will be resetted to 0 every day. Moreover, this is also on a per-user basis, so you can work around this limitation by spreading your URLFetch usage across several users and days, if that is something that you can manage.

Where to apply for more "URL Fetch calls" quota from google

I use URL fetch calls in Adwords scripts to scrape various sources, most of all my own web pages. I find myself limited by the quota of 20 000 requests/24hours. https://script.google.com/dashboard . Where can I apply for a larger quota?
I have substantially large Adwords accounts.
My account managers and Adwords support didn't know the answer and finally sent me to the Adwords API support team. Adwords API support sent me here to stackoverflow. Thanks for any input.
You may want to check this documentation which outlines various limits and limitations in AdWords scripts that you should be aware of. Also note that, Google Apps Script services impose daily quotas and hard limits on some features.
And as commented by #rckrd, to get a higher quota, you may want to sign up for G Suite. See this page for more information on quota limits for Google Services.

What are Google's Apps Script resource constraints?

I couldn't find this in the documentation. Ostensibly Google would terminate your script if it was consuming too many resources. Are there any guidelines on how to play nicely with Google's servers?
Have a look at the Apps Script Dashboard - especially under "Quota Limits." There are also rate limits that may limit the frequency of service calls in your projects.