Closed onlywithlad closed 1 year ago
Thank you for your feedback. This has been routed to the support team for assistance.
@onlywithlad It seems that the sender application took time to send the message and client instance is closed in between. I see that you are trying to use the older version (5.1.3) of SDK. I recommend you update to the latest version (5.2.0) and check this behavior in your environment. Additionally, you can start capturing Azure SDK logs if you are not doing it currently. Please refer to this document for details. Also, as you mentioned this is issue is happening intermittently, you may need to get it investigated through a Support ticket. Please let me know if you have any questions.
Thanks Saurabh
@onlywithlad Please let me know if you have any questions. Thanks.
HI @SaurabhSharma-MSFT thank you for your guidance! But even after upgrading to latest version, issue is occurring randomly. And to capture azure sdk logs we are looking for steps to reproduce the issue. Otherwise as our application is continuously running application it will exhaust the space.
HI @SaurabhSharma-MSFT we observed one more behavior. whenever we receive sender closed exception we are able to see one more error that is - "Microsoft.Azure.ServiceBus.ServiceBusException: The connection was inactive for more than the allowed 60000 milliseconds and is closed by container '9a467ca2-d058-4484-8c39-99e4842d3555'". As our application is continuous running application we are creating senders at the start of application only. we are not closing or recreating inbetween.
Having the same error on Asp.Net Core 5.
Azure.Messaging.ServiceBus.ServiceBusException: 'sender179' is closed (GeneralError) at Azure.Messaging.ServiceBus.Amqp.AmqpSender.SendBatchInternalAsync(IEnumerable
1 messages, TimeSpan timeout, CancellationToken cancellationToken)
at Azure.Messaging.ServiceBus.Amqp.AmqpSender.<>c.<4 operation, T1 t1, TransportConnectionScope scope, CancellationToken cancellationToken) at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.RunOperation[T1,TResult](Func
4 operation, T1 t1, TransportConnectionScope scope, CancellationToken cancellationToken)
at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.RunOperation[T1](Func4 operation, T1 t1, TransportConnectionScope scope, CancellationToken cancellationToken) at Azure.Messaging.ServiceBus.Amqp.AmqpSender.SendBatchAsync(ServiceBusMessageBatch messageBatch, CancellationToken cancellationToken) at Azure.Messaging.ServiceBus.ServiceBusSender.SendMessagesAsync(ServiceBusMessageBatch messageBatch, CancellationToken cancellationToken)
@onlywithlad
"Microsoft.Azure.ServiceBus.ServiceBusException: The connection was inactive for more than the allowed 60000 milliseconds and is closed by container '9a467ca2-d058-4484-8c39-99e4842d3555'". I don't think this is an issue as Azure network has a timeout value of 1 min. If a connection is idle for 1 minute, then that connection will be closed. Please refer a link to see more details.
Hi @SaurabhSharma-MSFT
is there any way to handle this connection idle scenario in code? As this is getting logged as an Error and we fear that it should not cause any message loss.
also is it related to OperationTimeout property of MessageSender class?
HI @SaurabhSharma-MSFT is there a way we can check if connection is idle or not? and in case of idle or sender closed issue how can we make it active again?
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @shankarsama, @DorothySun216.
Author: | onlywithlad |
---|---|
Assignees: | SaurabhSharma-MSFT |
Labels: | `Service Bus`, `Service Attention`, `Client`, `customer-reported`, `question`, `needs-team-attention` |
Milestone: | - |
Hi @onlywithlad. The Microsoft.Azure.ServiceBus
library has been deprecated and is only receiving critical security and bug fixes. Unfortunately, this means that feature requests such as adding the ability to recover from an idle connection closing are not under consideration. It is recommended that applications using Microsoft.Azure.ServiceBus
migrate to the current library, Azure.Messaging.ServiceBus
which is under active development.
Hi @onlywithlad. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.
Library name and version
Microsoft.Azure.ServiceBus 5.1.3
Query/Question
Hi Team,
We are having application in dot net core and hosted on fargate container. This application continuously listen to queue on one service bus. On receiving any message it sends that message to another queue of same service bus. To send a message we are creating MessageSender using queue path at the start of the application itself. Also we are using AMQPWebSockets as transport type. But during this we are experiencing intermittently exception as Microsoft.Azure.ServiceBus.ServiceBusException: 'sender9' is closed. Also on very next attempt using service bus retry it gets successfully send to that queue. We are not doing any reset or any explicit retry for this.
Exception : Microsoft.Azure.ServiceBus.ServiceBusException: 'sender9' is closed\n at Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync(IList
1 messageList)\\n at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func
1 operation, TimeSpan operationTimeout)\n at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func1 operation, TimeSpan operationTimeout)\\n at Microsoft.Azure.ServiceBus.Core.MessageSender.SendAsync(IList
1 messageList)\n at ManagedSubscriber.Core.ServiceBusOperations.Complete(Message auditMessage, ServiceBusEntites serviceBusEntites, Message retrievedMessage, MessageProcessingReport messageProcessingReport)Service bus package : Microsoft.Azure.ServiceBus Version : 5.1.3
AMQP package : Microsoft.Azure.Amqp version : 2.4.11
Dot net core : 3.1
Kindly guide us on the same.
Environment
Dot net core 3.1