-
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
readinto function hangs while in progress #24847
Comments
Label prediction was below confidence level |
@affanv14 Thanks for your feedback, we'll investigate asap. |
Hi @affanv14 Mohammed, thanks for the report. Can you share a bit about how you are tracking the progress of the download? Also are you setting the |
Hi @jalauzon-msft we originally had it running without any keywords and it was hanging. We tried a bunch of things including max_concurrency. the last thing we tried was with open(local_file, "wb") as f:
download_stream = blob_client.download_blob(
progress_hook=log_progress,
timeout=MAX_DOWNLOAD_WAIT_TIME,
max_concurrency=NUM_DOWNLOAD_THREADS,
read_timeout=MAX_DOWNLOAD_WAIT_TIME,
)
LOG.info("Download stream received from blob client")
download_stream.readinto(f) |
Hi again @affanv14 Mohammed, thanks for sharing the sample. Can you also share a sample of how you are tracking the progress to show the output in your original post? This progress tracking output is not something I recognize so it must be custom on your end. I'm trying to determine if the download itself is hanging or possibly the progress reporting is just never reporting that it's done. Thanks! |
def log_progress(completed: int, total: int) -> None:
LOG.info("{} bytes have been completed out of {}".format(completed, total)) here is what we used to log progress |
Thanks @affanv14 Mohammed, apologies for the back and forth. I did not see in your previous response that you were using the So, what I want to understand is if there is an issue with the |
There are statements after this(including a log statement right after) which is not reached. I am certain that it hangs on this. Furthermore, we previously had no params passed in the download_blob call - it was still having the issue |
Hi @affanv14 Mohammed, sorry for the long delay and thanks for confirming that The time the client will wait if there is no response from the server while reading data is configured via the I think a good next step would be to enable debug logging so we can see the requests/responses happening and see if it is indeed hanging while waiting for a response of if something else is happening. Can you try enabling debug logging? Some documentation on how to do that is here but here is a code snippet from that documentation of all you should need (there are other ways to configure in article if needed): import sys
import logging
from azure.storage.blob import BlobClient
# Set the logging level for the azure.storage.blob library
logger = logging.getLogger('azure.storage.blob')
logger.setLevel(logging.DEBUG)
# Direct logging output to stdout. Without adding a handler,
# no logging output is visible.
handler = logging.StreamHandler(stream=sys.stdout)
logger.addHandler(handler)
blob_client = BlobClient(..., logging_enable=True) Thanks for your help and patience. |
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
Describe the bug
when calling the below piece of code - the download hangs indefinitely while in progress
with open(local_file, "wb") as f: download_stream = blob_client.download_blob( ) download_stream.readinto(f)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The download should complete and the data should be stored in the file
Additional context
output below, hangs just after the last statement for 12+ hours
The text was updated successfully, but these errors were encountered: