skaut / skaut-google-drive-gallery

A WordPress gallery using Google Drive as file storage.
https://wordpress.org/plugins/skaut-google-drive-gallery/
MIT License
50 stars 9 forks source link

Google Drive API - price #231

Open kalich5 opened 5 years ago

kalich5 commented 5 years ago

Google Cloud Support, Donal: Thank you for contacting G Suite Support. My name is Donal and I'll be working with you today. While I read over your message, is there anything else you'd like to add?

Google Cloud Support, Donal: Hello Michal, how're you today?

Michal Janata: Hello,

I searched but did not find. I'm interested in the cost of increasing Google Drive API limits. We create a plugin for WordPress that retrieves photos from Google Drive. https://wordpress.org/plugins/skaut-google-drive-gallery/ But we have a problem with limits.

Michal Janata: Nowhere is it written what is the price for increasing the limits. Or how to create a paid app. To which the plugin could be connected. And the application would have unlimited limits.

Google Cloud Support, Donal: Thank you for that information. This would be technical support for G Suite. I may have limited access to details on the cost but let me check for you.

Google Cloud Support, Donal: Can you give me 4-5 minutes to check on some details. Are you okay to wait?

Michal Janata: ok wait :-)

Google Cloud Support, Donal: Thank you Michal, I'll be right back.

Google Cloud Support, Donal: Thanks for waiting Michal.

Michal Janata: :-)

Michal Janata: no problem :-)

Google Cloud Support, Donal: Can I ask are you one of the developers for the project?

Michal Janata: yes

Google Cloud Support, Donal: I might have some details that are useful.

Michal Janata: We are mainly interested in raising the API.

Google Cloud Support, Donal: This link https://developers.google.com/sheets/api/limits is for Google Sheets and increasing the limits. The form should be the same for the Drive API if you were to fill it out.

Google Cloud Support, Donal: Sorry, if you were to follow the same steps on that page.

Google Cloud Support, Donal: As a developer you would have access to the console https://console.developers.google.com/apis/enabled to do this.

Google Cloud Support, Donal: Just checking we are still connected Michal?

Michal Janata: yes

Michal Janata: I know this, I care about the price.

Michal Janata: I don't have a paying account yet.

Michal Janata: Your support pages aren't very clear and you don't have prices anywhere.

Google Cloud Support, Donal: As I said this is technical support and can have limited access to price details outside of G Suite. Let me see if I can get any details.

Michal Janata: How come outside G Suite. We would create a paid account and app in G Suite.

Google Cloud Support, Donal: It's on the API side of G Suite. I'm seeing if there is any specific on prices for services. If not you may have to contact Sales https://gsuite.google.ie/intl/en_ie/contact-form/

Google Cloud Support, Donal: Are you okay to wait another 4-5 minutes?

Michal Janata: ok

Google Cloud Support, Donal: Thanks again for waiting Michal.

Michal Janata: no problem :-)

Google Cloud Support, Donal: There are currently no costs associated with G Suite API quota increases.

Google Cloud Support, Donal: You may have seen this Help Center article 'Monitor API quotas' https://support.google.com/a/answer/6301355 already

Michal Janata: yes

Google Cloud Support, Donal: Other API's such as Maps and GCP can have costs associated with them.

Google Cloud Support, Donal: You may have come across those prices in your search.

Michal Janata: Nothing pays for Google Drive API quota increases here?

Google Cloud Support, Donal: There is no costs associated with the G Suite Drive API to increase quotas currently.

Google Cloud Support, Donal: This would mean you are good to go ahead and increase those limits.

Michal Janata: ok :-)

Michal Janata: Thank you very much for the information :-)

Michal Janata: bye :-)

Google Cloud Support, Donal: You're very welcome.

adamjanovsky commented 5 years ago

So which limit am I supposed to increase if I'm encoutering the "Byl překročen maximální počet požadavků. Zkuste to prosím za minutu znovu." notification (translates as "Rate limit exceeded")?

When being on the https://console.developers.google.com/apis/api/drive.googleapis.com/quotas?project=name_of_the_project dashboard, all displayed quotas seem to be way under the margin, yet, I keep getting the error message above.

Note that I'm trying to render roughly 65 photo albums on the main page divided roughly equally into three folders. Sometimes the first folder appears and others not. This issue renders the plugin unusable at the moment.

adamjanovsky commented 5 years ago

Could https://en.wikipedia.org/wiki/Exponential_backoff this sort of thing be somehow implemented?

adamjanovsky commented 5 years ago

Just FYI: During the last week, I've been through the process of requesting higher API quota. I figured that 'requests per user per 100 seconds' limit is the one to go for and wrote to the google. I was asked several questions, including 'what is your current error rate'.

I was not provided the quota increase since I exhibited too low error rate. Practically, more than 50% attempts to deliver the service ends with error. Yet, for some reason these are not counted as errors on the google side -- could it be that the exceptions are caught and treated, so no formal error arises?

Still, counting it back and forth, I reckon that for the gallery I currently have (2k photos evenly divided into 60 albums) I would need up to 5k requests / per user per 100 seconds (to be on the safe side).

adamjanovsky commented 4 years ago

So one more update. After explaining the situation to the Google Support (i.e. not exhibiting high error rate does not mean I'm not having errors), I've been approved to increase the quota to 10k/100 sec, which is happily enough even for my gallery. With this issue resolved, the speed of loading is my only concern at the moment.

marekdedic commented 4 years ago

@kalich5 What @adamjanovsky describes is a very important data-point for us - it tells us that higheh quotas do solve the problem with the errors - even though by looking at the Google API console, we don't see nearly as many requests as is the quota.

Thanks for the report ;)

kalich5 commented 4 years ago

I don't see anything in the console either. And I can help with testing the new version. I can't help any more.