You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gnmic retries stream subscriptions even when server responds with PERMISSION_DENIED or RESOURCE_EXHAUSTED #834
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?
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.
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.
Activity
karimra commentedon Mar 16, 2026
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.
fnchooft commentedon Apr 15, 2026
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.
dlanov commentedon Jul 23, 2026
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.