taers232c / GAMADV-XTD3

Command line tool to manage Google Workspace
687 stars 86 forks source link

User-Rate limit exceeded when deleting emails from all users #375

Closed ohi2u closed 9 months ago

ohi2u commented 9 months ago

I am trying to run the command "gam all users delete messages query "rfc822msgid:MSGID" doit" to remove a message from all users in the domain (only 232) - I have set "api_calls_rate_check" to true and have changed the values for api_calls_rate_limit to 200/300 but the user limit exceeded error shows up around 118 users in.

I checked on my google console and it seems like I am not hitting any quota on there.

I have tried updating to the latest version (6.63.18) and am still facing this error.

How can I resolve this?

taers232c commented 9 months ago

Show the error message you're getting.

On Thu, Sep 21, 2023 at 1:26 PM ohi2u @.***> wrote:

I am trying to run the command "gam all users delete messages query "rfc822msgid:MSGID" doit" to remove a message from all users in the domain (only 232) - I have set "api_calls_rate_check" to true and have changed the values for api_calls_rate_limit to 200/300 but the user limit exceeded error shows up around 118 users in.

I checked on my google console and it seems like I am not hitting any quota on there.

I have tried updating to the latest version (6.63.18) and am still facing this error.

How can I resolve this?

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/375, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCTYL45J4UQLTJOXCEYUS3X3SPIXANCNFSM6AAAAAA5CDM7YM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Ross Scroggs @.***

taers232c commented 9 months ago

These are retryable messages, each command is attempted 10 time, the first retries are silent, then you get indictations of the tries 4/10, 5/10, 6/10, ... If the 10 tries are exhausted, then you'll get a final message saying the command failed.

ohi2u commented 9 months ago

Show the error message you're getting. On Thu, Sep 21, 2023 at 1:26 PM ohi2u @.> wrote: I am trying to run the command "gam all users delete messages query "rfc822msgid:MSGID" doit" to remove a message from all users in the domain (only 232) - I have set "api_calls_rate_check" to true and have changed the values for api_calls_rate_limit to 200/300 but the user limit exceeded error shows up around 118 users in. I checked on my google console and it seems like I am not hitting any quota on there. I have tried updating to the latest version (6.63.18) and am still facing this error. How can I resolve this? — Reply to this email directly, view it on GitHub <#375>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCTYL45J4UQLTJOXCEYUS3X3SPIXANCNFSM6AAAAAA5CDM7YM . You are receiving this because you are subscribed to this thread.Message ID: @.> -- Ross Scroggs @.***

Temporary error: rateLimitExceeded - User-rate limit exceeded. Retry after 2023-09-21T20:27:32.610Z, Backing off: 16 seconds, Retry: 4/10 Temporary error: rateLimitExceeded - User-rate limit exceeded. Retry after 2023-09-21T20:27:32.610Z, Backing off: 32 seconds, Retry: 5/10 Temporary error: rateLimitExceeded - User-rate limit exceeded. Retry after 2023-09-21T20:27:32.610Z, Backing off: 60 seconds, Retry: 6/10 Temporary error: rateLimitExceeded - User-rate limit exceeded. Retry after 2023-09-21T20:27:32.610Z, Backing off: 60 seconds, Retry: 7/10 Temporary error: rateLimitExceeded - User-rate limit exceeded. Retry after 2023-09-21T20:27:32.610Z, Backing off: 60 seconds, Retry: 8/10 Temporary error: rateLimitExceeded - User-rate limit exceeded. Retry after 2023-09-21T20:27:32.610Z, Backing off: 60 seconds, Retry: 9/10

ERROR: 429: rateLimitExceeded - User-rate limit exceeded. Retry after 2023-09-21T20:27:32.610Z

This is after the 118th user.

So does this mean I do need to raise quotas on my google api console?

ohi2u commented 9 months ago

I have tried lowering the api_calls_rate_limit down to 50 and I still error out at the 118th user.

taers232c commented 9 months ago

Send Me a Meet/Zoom invitation and we'll investigate.

Ross Scroggs @.***

On Sep 21, 2023, at 2:37 PM, ohi2u @.***> wrote:

I have tried lowering the api_calls_rate_limit down to 50 and I still error out at the 118th user.

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/375#issuecomment-1730336028, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCTYL3KH73VWPRPKIAZPZDX3SXSXANCNFSM6AAAAAA5CDM7YM. You are receiving this because you commented.

taers232c commented 9 months ago

Set api_calls_rate_limit to 50 and test

ohi2u commented 9 months ago

Getting the same result with api_calls_rate_limit set to 50 - emailed you a google meet link if you are still around.

ohi2u commented 9 months ago

The issue was related to another application we use to back up emails (backupify) the user in question was indeed just getting rate limited because a job was retrying on backupify, and another script i use to push email signatures.

I disabled his email backup temporarily and waited a day, then was able to use the google api via gam correctly without the api error. Thanks for helping me troubleshoot the other day Ross - appreciate it!