-
Notifications
You must be signed in to change notification settings - Fork 51
ServiceBusQueue.RenewLocks() fails spontaneously #246
Comments
It looks RenewLocks() fails always after about 1 hour from creating queue. At the same time, it is still possible to receive messages from queue without errors. |
Thanks for filing an issue. |
Did you mean #245? The first thing i did after discovering the problem is update to version 0.10.16, but bug is still there. Currently i'am using REST API call if RenewLocks fails to workaround problem. |
@orzel7 Hi, we investigated further the Renewlocks code and we'll be pushing some changes that will probably fix the issues you are seeing. |
@orzel7 v0.11.1 includes the RPC link changes that should improve (hopefuly remove) the RenewLocks issues that you were experiencing |
Problem still exists on version 11.1 |
it's hard to tell what's going on if we can't repro. we need more info to know how this happens and narrow down the case |
Ok, maybe this is another problem, duplication of #249 |
I've found the way, how to reproduce this problem quicker. Just change this function(file sas.go from azure-amqp-common.go) // GetToken gets a CBS SAS token
func (t *TokenProvider) GetToken(audience string) (*auth.Token, error) {
signature, expiry := t.signer.SignWithDuration(audience, 2*time.Hour)
return auth.NewToken(auth.CBSTokenTypeSAS, signature, expiry), nil
} to func (t *TokenProvider) GetToken(audience string) (*auth.Token, error) {
signature, expiry := t.signer.SignWithDuration(audience, 20*time.Minute)
return auth.NewToken(auth.CBSTokenTypeSAS, signature, expiry), nil
} After this change, RenewLocks will fail after about 25 minutes. It is obvious for me that token for RPC channel is not refreshed properly. |
It comes out of my observations:
|
Hi @orzel7, We've moved development of this package to the azure-sdk-for-go repo link. I've run this test against the new Service Bus library and can't replicate it but we've done some changes in the internals that have probably helped in this regard.
I'm adding a permanent test into the stress test suite as a result of your bug. You've been a very helpful contributor and I really appreciate your deep dives when you're troubleshooting bugs. I do hope you'll continue to do so for the new package as well. |
ServiceBusQueue.RenewLocks() sometimes fails with error:
*Error{Condition: amqp:connection:forced, Description: The connection was inactive for more than the allowed 300000 milliseconds and is closed by container 'LinkTracker'. TrackingId:2c567f5508764c7fbb0f2be74ca7e526_G34, SystemTracker:gateway7, Timestamp:2021-08-18T12:32:45, Info: map[]}
Message Lock duration is set to 1 min
RenewLocks is called with 20 sec. interval
Error occurred after first call to RenewLocks(), i.e after 20 seconds after message has been received.
The text was updated successfully, but these errors were encountered: