GAM-team / got-your-back

Got Your Back (GYB) is a command line tool for backing up your Gmail messages to your computer using Gmail's API over HTTPS.
https://github.com/GAM-team/got-your-back/wiki
Apache License 2.0
2.61k stars 206 forks source link

Too many queries per minute #287

Closed quasisphere closed 3 years ago

quasisphere commented 4 years ago

Full steps to reproduce the issue:

  1. Try to backup a gmail account.

Expected outcome (what are you trying to do?):

All emails are downloaded.

Actual outcome (what errors or bad behavior do you see instead?):

Some mails are not downloaded (although majority are). During download there are complaints like the one below about too many queries per minute made:

<HttpError 403 when requesting https://www.googleapis.com/gmail/v1/users/me/messages/******?format=raw&fields=id%2ClabelIds%2CinternalDate%2Craw&alt=json returned "Quota exceeded for quota metric 'Queries' and limit 'Queries per minute per user' of service 'gmail.googleapis.com' for consumer 'project_number:******'.">

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

prosilire commented 3 years ago

@quasisphere I got the same thing, so I have limited the batch size to 4 using --batch-size 4 Instead of 100 in a batch, this significantly slows down the backup such that I'm downloading just fewer than 3000 per minute (that seemed to be the cut-off).