Raising Google Drive API per-user limit does not prevent rate limit exceptions

后端 未结 3 1190
梦毁少年i
梦毁少年i 2020-12-30 11:40

I\'m working with a process that uses the Drive API to upload plain text files to Google Drive. The process frequently hits rate limit exceptions even though the actual num

相关标签:
3条回答
  • 2020-12-30 11:53

    It means something is wrong in your configuration. You can use Drive API with low quota like what you are experiencing even when your API configuration is wrong.

    1. Please check if you turned on Drive API in APIs Console > Services
    2. Please check if you use correct API key or authorization flow.

    If you still cannot find what causes you this error, please attach minimum code to reproduce this error.

    0 讨论(0)
  • 2020-12-30 12:00

    There is a lower limit specifically for uploads, and it's per-user across all apps. Will see if we can post the limit in docs.

    0 讨论(0)
  • 2020-12-30 12:09

    Following up on Steve Bazyl's answer ...

    This Google API exception was generated by a C# ETL program that made individual sheet row requests to load into a SQL database table.

    ex = {"Google.Apis.Requests.RequestError\r\nInsufficient tokens for quota 'ReadGroup' and limit 'USER-100s' of service 'sheets.googleapis.com' for consumer ...

    The "USER-100s" limit appears to pertain to the following text from the Google API v4 "Usage Limits" page.

    This version of the Google Sheets API has a limit of 500 requests per 100 seconds per project, and 100 requests per 100 seconds per user. Limits for reads and writes are tracked separately. There is no daily usage limit.

    Basically, either a throttling mechanism is required to avoid these requests per time unit constraints, a reduction in the requests made, or a combination of both.

    This Google page also mentions that these quota limits can be increased with a "billing account".

    0 讨论(0)
提交回复
热议问题