-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rate Limiting/Retry mechanism for short-term errors #1
Comments
Can simply use a mutex, a last-sent timestamp, and a sleep to achieve this. The parameter can be the minimum time between requests. |
Alternatively we can implement error handling for errors like 421. This happens when I try to send 20 emails at once using a gmail SMTP server:
https://chat.openai.com/share/96fe4067-6bc9-4696-add3-e8788e07aea3 All 4xx SMTP errors are retriable: |
Solved by #2 (comment) |
SMTP providers usually have (short-term) rate limits (e.g. can't send more than 20 emails per second). Add an option to support this. The GitHub provider achieves this by using a custom centralized transport.
The text was updated successfully, but these errors were encountered: