Skip to content

Handle RATE_LIMIT_HIT (Rate limit exceeded) errors #773

Open

Description

@i-ky

It would be nice if this library handled RATE_LIMIT_HIT errors automatically by sleeping for retry-after seconds and retrying the request. Otherwise this logic needs to be implemented in every user application.

Activity

  1. i-ky commented on Jan 18, 2023

    @i-ky
    ContributorAuthor

    @zulipbot add "enhancement" "help wanted"

  2. Fahdmoh01 commented on Oct 1, 2023

    @Fahdmoh01

    @zulipbot claim

  3. zulipbot commented on Oct 1, 2023

    @zulipbot
    Member

    Welcome to Zulip, @Fahdmoh01! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

    Here's some tips to get you off to a good start:

    As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

    See you on the other side (that is, the pull request side)!

  4. Fahdmoh01 commented on Oct 1, 2023

    @Fahdmoh01

    @i-ky does the Rate limit has to do with the message_limit?

  5. i-ky commented on Oct 1, 2023

    @i-ky
    ContributorAuthor

    @i-ky does the Rate limit has to do with the message_limit?

    Sorry, I am not familiar with Zulip's internals. What is message_limit you are talking about?

  6. Fahdmoh01 commented on Oct 1, 2023

    @Fahdmoh01

    @i-ky does the Rate limit has to do with the message_limit?

    Sorry, I am not familiar with Zulip's internals. What is message_limit you are talking about?

    message_limit is a variable inside the Ratelimit class of the zulip python api. where do I go to ask for further clarification for this issue?

  7. i-ky commented on Oct 1, 2023

    @i-ky
    ContributorAuthor

    I can only clarify what I propose to be changed from a python-zulip-api user's perspective, how it is to be changed from python-zulip-api perspective is a different matter.

  8. timabbott commented on Oct 1, 2023

    @timabbott
    SponsorMember

    This need to be done as an option -- some clients might very much not want to have sleeps of this form be part of what might happen.

    I suppose there's also a question of whether we want the semantics to be to automatically retry the operation that failed due to the rate limit, or something else.

    We also need to be cautious in implementing documenting this sort of thing to make sure we don't end up with bugged clients hitting the server exactly as often as the rate limits allow - that can generate a lot more useless load than something that doesn't retry. Probably this is not too hard to manage.

  9. zulipbot commented on Oct 14, 2023

    @zulipbot
    Member

    @Fahdmoh01 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

  10. 32 remaining items

  11. tenzindayoe commented on Jul 18, 2026

    @tenzindayoe
    Collaborator

    @zulipbot claim

  12. zulipbot commented on Jul 18, 2026

    @zulipbot
    Member

    Welcome to Zulip, @tenzindayoe! By picking up a Zulip issue, you're promising to do your best to follow Zulip's contributing guidelines. Neglecting to do so wastes maintainer time, and may result in being banned from contributing to Zulip.

    To get started:

    1. Work through all the "Prior to picking up your first issue" sections of the Zulip contributor guide.
    2. Post a comment here describing your plan for how to approach this issue. Before you claim an issue, you should be confident that you will be able to tackle it effectively.
    3. Accept the invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. To avoid filling your inbox, we recommend unwatching this repository.

    The issue will be assigned to you when all three steps have been completed. If you get stuck, you can always @zulipbot abandon this issue, and pick a different one.

    If someone else claims this issue while you're working through the checklist, no worries! You can contribute by providing feedback on their pull request. If you’ve made good progress in understanding part of the codebase, you can also find another “help wanted” issue in the same area to work on.

  13. zulipbot commented on Jul 28, 2026

    @zulipbot
    Member

    @tenzindayoe You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

  14. devnishantt commented on Sep 29, 2026

    @devnishantt
    Collaborator

    @zulipbot claim

    I'd like to add an opt-in Client(auto_retry_rate_limits=True) so 429 /
    RATE_LIMIT_HIT sleeps for retry-after (plus jitter) and retries up to 10
    times. Default stays False so callers that cannot block are unchanged.

    #908 had the same idea and was closed unreviewed.

  15. zulipbot commented on Sep 29, 2026

    @zulipbot
    Member

    Welcome to Zulip, @devnishantt! By picking up a Zulip issue, you're promising to do your best to follow Zulip's contributing guidelines. Neglecting to do so wastes maintainer time, and may result in being banned from contributing to Zulip.

    To get started:

    1. Work through all the "Prior to picking up your first issue" sections of the Zulip contributor guide.
    2. Post a comment here describing your plan for how to approach this issue. Before you claim an issue, you should be confident that you will be able to tackle it effectively.
    3. Accept the invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. To avoid filling your inbox, we recommend unwatching this repository.

    The issue will be assigned to you when all three steps have been completed. If you get stuck, you can always @zulipbot abandon this issue, and pick a different one.

    If someone else claims this issue while you're working through the checklist, no worries! You can contribute by providing feedback on their pull request. If you’ve made good progress in understanding part of the codebase, you can also find another “help wanted” issue in the same area to work on.

  16. zulipbot commented on Oct 9, 2026

    @zulipbot
    Member

    @devnishantt We noticed that you have not made any updates to this issue or linked PRs for 10 days. Please comment here if you are still actively working on it. Otherwise, we'd appreciate a quick @zulipbot abandon comment so that someone else can claim this issue and continue from where you left off.

    If we don't hear back, you will be automatically unassigned in 4 days. Thanks!

  17. devnishantt commented on Oct 9, 2026

    @devnishantt
    Collaborator

    Still working on this. The PR is up and waiting for review:
    #924

    Happy to revise if a reviewer asks for changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions