Repository navigation
Default value for max_retries is too short to "clear" all rate limit windows #1889
New issue
New issue
Closed as not planned
#1895
Closed as not planned
Default value for max_retries is too short to "clear" all rate limit windows #1889
#1895
Labels
enhancement
stale
Description
@swarren's profile
swarren
opened
on Feb 10, 2022
Description of the problem, including code/CLI snippet
The default value of max_retries is insufficient to "clear" any rate limiting limit, for responses where the Retry-After header is missing. The default is 10, which yields a max cur_retries value of 9, which yields a maximum sleep time of ~50 seconds. At least some rate limits are computed over a 10 minute window (600 seconds) (e.g. the recently added limit on /users/:id), so ideally we'd have a default max_retries that would (cumulatively) sleep at least that long.
Expected Behavior
Default max_retries value is large enough to cause the library to sleep long enough to pass any rate limit window.
Actual Behavior
The library doesn't sleep long enough, so a exception is thrown when the rate limit is reached, despite retrying for a while.
Specifications
- python-gitlab version: 1.15.0 (but I checked the latest code in git and it appears identical)
- API version you are using (v3/v4): Whatever the library default is.
- Gitlab server version (or gitlab.com): gitlab.com
Metadata
Metadata
Assignees
No one assigned
Labels
enhancement
stale
Type
No type
Projects
No projects
Milestone
No milestone
Relationships
None yet
Development
No branches or pull requests
Issue actions