Skip to content
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

On Azure .exists blob timeout, log the exception and return False #6895

Merged
merged 3 commits into from
Apr 14, 2020

Conversation

humitos
Copy link
Member

@humitos humitos commented Apr 13, 2020

We have been experimenting some issues with Azure Blob storage. Our current timeout is the django-storages default (20 secs). We want to reduce it to ~2s, but without breaking the code and start returning 500. So, we log the error and return False.

We have been experimenting some issues with Azure Blob storage. Our current
timeout is the django-storages default (20 secs). We want to reduce it to ~2s,
but without breaking the code and start returning 500. So, we log the error and
return False.
@humitos
Copy link
Member Author

humitos commented Apr 13, 2020

I'm not sure that this really works. I wasn't able to reproduce it locally with lower azure timeout, or even stopping the storage container.

Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not feeling great about merging this without seeing that it actually works. I guess we'll see in prod?

readthedocs/storage/azure_storage.py Outdated Show resolved Hide resolved
@humitos
Copy link
Member Author

humitos commented Apr 14, 2020

Yeah. Feel the same. I don't have another idea about how to test it, but I don't understand why it does not work when stopping the storage container either. The custom .exists function is executed (I put a pdb there and it stopped), but the timeout seems to not be respected.

I think the code won't fail, but it may just does not do what we expect it to do 😕

@ericholscher
Copy link
Member

@humitos I'm happy to merge it once we fix the tests, and we can see what happens in prod.

@ericholscher ericholscher merged commit e988f2a into master Apr 14, 2020
@ericholscher ericholscher deleted the humitos/azure-blob-timeout branch April 14, 2020 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants