-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed as not planned
Closed as not planned
Copy link
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.MessagingMessaging crewMessaging crewService Buscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-author-feedbackWorkflow: More information is needed from author to address the issue.Workflow: More information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.There has been no recent activity on this issue.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
- Package Name: azure-servicebus
- Package Version: 7.4.0 / 7.12.2
- Operating System: macOS
- Python Version: 3.8.13
Describe the bug
If we take a batch of messages from the Service Bus Queue, it takes a long time to renew the locks (since there is a sleep of 0.5s between each update). The renewal happens very close to the end of expiry (10s) - so it is a very critical window.
The only solution for a large batch (say of size 400) is to have a ridiculously large number of threads that can renew the locks together.
To Reproduce
Steps to reproduce the behavior:
- Create a queue (with a lock lifetime of 4m) and push some messages in it.
- Put the Queue name and Connection string in this sample code and run it. https://gist.github.com/tj---/cf9cec837febea4f9903d987019ba651 [Alternate: with hack]
- Observe the error logs start showing up after ~4 minutes (only a few locks will be renewed, renewal of the rest will fail)
Expected behavior
- The renewal of locks should be permitted via a configurable
renew_period
parameter and soon (eg: I would start renewing the locks 1-2 minutes in advance) - It should be possible to increase the lock lifetime at the Queue itself (which is currently a max of 5m)
Screenshots
If applicable, add screenshots to help explain your problem.
-
Logs (with issue):
redacted_issue_log.txt -
Logs (With hack in place - increased the
_renew_period
to 90s andmax_workers
= 2):
redacted_ok_log.txt
Additional context
Original reference: #35717 (comment)
Metadata
Metadata
Assignees
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.MessagingMessaging crewMessaging crewService Buscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-author-feedbackWorkflow: More information is needed from author to address the issue.Workflow: More information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.There has been no recent activity on this issue.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that