Closed Master-Matt closed 5 years ago
Hi @Master-Matt, thanks for reaching out!
To confirm, is your VM running in Azure? If yes, is it in the same region as the Storage account you are listing?
The listing generator is making calls to the service lazily to fetch batches of blobs. I suspect that sometimes these calls take longer than expected, and get retried. Perhaps you could turn on logging and see if this is the case.
A potential workaround is to set the socket_timeout on the service object to a shorter time:
:param int socket_timeout: If specified, this will override the default socket timeout. The timeout specified is in seconds. See DEFAULT_SOCKET_TIMEOUT in _constants.py for the default value.
@zezha-msft Yes, everything is in Azure. I am not in the same region as the storage account. Storage is EU and I'm in US. I will turn on debugging and grab some output. It's a lot of spam since there are 40k+ blobs to go through every time I call this. I will also try out setting the timeout. Thanks!!
So the issue was that, since I'm using python 3.5, the timeout is a tuple of (20,2000) where the 2000 is the read timeout (about 30 minutes) I shortened it down quite a bit. Thanks for the help!
@Master-Matt sounds good! Please don't hesitate if you have any other question or issue. 😄
Which service(blob, file, queue) does this issue concern?
BlockBlobService
Which version of the SDK was used? Please provide the output of
pip freeze
.asn1crypto==0.24.0 azure-common==1.1.19 azure-storage-blob==1.5.0 azure-storage-common==1.4.0 certifi==2019.3.9 cffi==1.12.2 chardet==3.0.4 coverage==4.0.3 cryptography==2.6.1 entrypoints==0.3 fastavro==0.21.21 flake8==3.7.7 idna==2.8 influx-client==1.8.0 influxdb==5.2.2 mccabe==0.6.1 mock==2.0.0 nose==1.3.7 numpy==1.16.2 pandas==0.24.2 pandavro==1.5.0 pbr==5.1.3 pycodestyle==2.5.0 pycparser==2.19 pyflakes==2.1.1 python-dateutil==2.8.0 pytool==3.15.0 pytz==2019.1 requests==2.21.0 simplejson==3.16.0 six==1.12.0 urllib3==1.24.2
What problem was encountered?
I'm using this service in a docker container, and it will occasionally hang for up to 30 minutes. Not sure what to do because it happens as the blobs are iterated through.
I had the same issue when creating the generator, but it can be mitigated by using the timeout option. Iv'e attached the trace.
Here is a shot of VM usage to show that it looks like its just idling after the hangs occur. Here, it occurs at 12:22 and 12:42![Screenshot from 2019-06-24 13-12-45](https://user-images.githubusercontent.com/20187801/60041929-1db7a400-9682-11e9-8f22-eb97c3582fe9.png)
Have you found a mitigation/solution?
No