-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Storage] Confusing behavior accessing nonexistent Azure Queue Storage #14356
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage. |
Hi @shwars I was able to reproduce the issue, I'm gonna look into finding a solution for getting a shorter timeout and will get back to you :) |
hi @shwars This should be resolved if you set retry_connect=0 when initiating QueueClient, this will help throw immediately on connection failure. currently the connection_timeout=20 (seconds) you can set to a smaller value if you want. Let me know if you have any questions! |
Hi @xiafu-msft, thank you for the clarification. I was thinking about the possibility to manually setting timeout to smaller value. However, considering first-time user, it would be convenient to have timeout set to some reasonable value by default. 20 seconds is probably a reasonable value (although rather on a long side), but it is not clear why the actual waiting time in my case is 80 seconds, and not 20. |
Hi @shwars SDK defaults retry_connect=3, which means SDK will automatically retry to connect for you internally. |
Thanks for the explanation, @xiafu-msft. I understand where the problem is coming from. My concern is that for a non-experienced user who does not understand the internals this 80-seconds delay will look extremely strange, and make things more difficult to debug. Do you think that we should add the notice to docs saying that invalid queue name will result in a long timeout? |
Hi @shwars That's a good suggestion, we absolutely should make the doc better and friendly to non-experienced user! |
Hi @shwars Just an update. |
@xiafu-msft This problem was discovered as part of an end-to-end scenario, where I tried to evaluate how seamless is the technology for beginners. I believe that long 30 sec timeout instead of an error message is kind of misleading, and thus I think at least a short paragraph of text explaining this behaviour is nice to have in a quickstart document. |
close this issue for now since the link has been added, feel free to comment on it or open a new issue if you have any other questions! |
Describe the bug
When trying to access non-existent account of Azure queue storage,
QueueClient
is created w/out errors, and callingreceive_messages()
results in a long timeout (followed by an error).To Reproduce:
Consider the following code:
This code prints both messages immediately, followed by a long (80 seconds) delay. Traceback of an error that follows is available here
The long timeout behavior is confusing, especially when you are debugging a program that has an endless loop over queue messages, and you are wondering, why it is not executing.
Expected behavior
One of the following options:
QueueClient
(I understand this might not be possible, because additional REST call would be required)The text was updated successfully, but these errors were encountered: