Skip to content

gnmic retries stream subscriptions even when server responds with PERMISSION_DENIED or RESOURCE_EXHAUSTED #834

Open

Description

@m08071998

Hi gnmi developers

gnmic infinitely attempts to retry sending subscription stream request to the server even when it responds with PERMISSION_DENIED or RESOURCE_EXHAUSTED. This makes gnmic keep holding a connection with server using resources.

Looks like, gnmic does not handle any error code in response, and indefinitely attempts a retry.

Should the client not handle such error codes gracefully and not do indefinite reattempts on failures from which we cannot recover even on retries?

Thanks.

Activity

  1. karimra commented on Mar 16, 2026

    @karimra
    Collaborator

    This can definitely be improved. At the time this was written most routers did not return proper gRPC errors so gNMIc did not inspect them and even if it did there was no distinction between retryable and non-retryable error.

  2. fnchooft commented on Apr 15, 2026

    @fnchooft

    Could one implement all the error-codes as defined here: https://www.openconfig.net/docs/gnmi/gnmi-specification/index.html#347-error-handling?

    That would be of great help - specifically if the server provides the proper error-codes.

  3. dlanov commented on Jul 23, 2026

    @dlanov
    Contributor

    I would like to work on this. I plan to add explicit retry classification for gRPC Subscribe errors, preserve retries for transient and unclassified errors, stop retrying terminal errors including PERMISSION_DENIED and RESOURCE_EXHAUSTED, and add focused table-driven tests. I will keep the change limited to subscription retry handling.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions