Skip to content
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

[ServiceBus] AMQP LinkDetach to be considered as retryable error #15749

Closed
yunhaoling opened this issue Dec 10, 2020 · 3 comments
Closed

[ServiceBus] AMQP LinkDetach to be considered as retryable error #15749

yunhaoling opened this issue Dec 10, 2020 · 3 comments
Assignees
Labels
blocking-release Blocks release Client This issue points to a problem in the data-plane of the library. Service Bus
Milestone

Comments

@yunhaoling
Copy link
Contributor

yunhaoling commented Dec 10, 2020

10 mins idle timeout (no activity on a link) would make the service proactively shutdown a link. This seems to be a common scenario where we should not expect there's always messaging activity happening.

In current condition based error handling, LinkDetach (triggered by the 10mins idle timeout) would fall into the category of ServiceBusError.
However, to recovery from the error is pretty straight forward by re-establishing the link.
We could do this internally to simplify user code.

  • need cross team check

Error logging

Traceback (most recent call last):#12
File "/usr/local/lib/python3.9/site-packages/azure/servicebus/_base_handler.py", line 293, in _do_retryable_operation#012
return operation(**kwargs)#12
File "/usr/local/lib/python3.9/site-packages/azure/servicebus/_servicebus_sender.py", line 238, in _send#012
self._handler.send_message(message.message)#12
File "/usr/local/lib/python3.9/site-packages/uamqp/client.py", line 725, in send_message#012
running = self.do_work()#12
File "/usr/local/lib/python3.9/site-packages/uamqp/client.py", line 395, in do_work#012
if not self.client_ready():#12
File "/usr/local/lib/python3.9/site-packages/uamqp/client.py", line 379, in client_ready#012
if not self._client_ready():#12
File "/usr/local/lib/python3.9/site-packages/uamqp/client.py", line 527, in _client_ready#012
if self.message_handler.get_state() == constants.MessageSenderState.Error:#12
File "/usr/local/lib/python3.9/site-packages/uamqp/sender.py", line 184, in get_state#012
raise self._error#012uamqp.errors.LinkDetach: ErrorCodes.LinkDetachForced: The link 'G6:3354839:sender-link-4e63dd77-7eaf-4d6d-8448-299b5161661b' is force detached. Code: publisher(link11766). Details: AmqpMessagePublisher.IdleTimerExpired: Idle timeout: 00:10:00.#12#012

@yunhaoling yunhaoling added Service Bus Client This issue points to a problem in the data-plane of the library. labels Dec 10, 2020
@AndreCimander
Copy link

AndreCimander commented Jan 26, 2021

Was this already fixed in 7.0.1, by chance? We encountered this issue today with the current master of Celery on servicebus 7.0.0

@yunhaoling
Copy link
Contributor Author

hey @AndreCimander , sorry I didn't have the time to work on this one recently, will start once I get some free cycles.
btw, could you give me more context on master of Celery, I actually don't know what it is.

and before the internal improvement is made, I recommend you to wrap your code with your own retry logic.
thanks for you patience in advance😊

@yunhaoling yunhaoling added this to the [2021] March milestone Feb 9, 2021
@yunhaoling yunhaoling self-assigned this Feb 10, 2021
@yunhaoling yunhaoling added the blocking-release Blocks release label Feb 11, 2021
@yunhaoling
Copy link
Contributor Author

PR merged, this is gonna be included in our 7.0.2 release.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocking-release Blocks release Client This issue points to a problem in the data-plane of the library. Service Bus
Projects
None yet
Development

No branches or pull requests

2 participants