django-storages
django-storages copied to clipboard
Retry policy for Azure Blob stores?
I am using the following dependencies (Django and Azure Blob storage):
django==1.11.15 django-storages==1.7.1 django-storages-azure==1.6.8 azure==4.0.0
It appears whenever I save an image using the .save
method on the model's attribute I receive an exception from inside '/site-packages/azure/storage/common/storageclient.py'
that says The specified blob does not exist. ErrorCode: BlobNotFound
and specifies that Retry policy did not allow for a retry
.
The exception also specifies the full URL to the Blob - it's always retrievable if I manually visit the URL. From what I can tell this error is completely benign, and has to do with some sort of write/read consistency issue where metadata is trying to be read back too quickly after the object was written (via a HEAD request against Azure's server). It looks to me that perhaps a retry policy would be the way to fix this, although I do not see any support for retry policies in django-storages. I feel like this is a bug but I am not sure - it definitely clouds up our Sentry logs. Is this perhaps a known issue? I did not find anything in the issue history or on google that suggests other people have this problem.
Reference: https://azure.microsoft.com/en-us/blog/azure-storage-client-library-retry-policy-recommendations/