theriverman / django-minio-backend

Minio Backend for Django
https://pypi.org/project/django-minio-backend/
MIT License
111 stars 22 forks source link

initialize_buckets command is stuck for several hours #27

Closed abhi1693 closed 2 years ago

abhi1693 commented 3 years ago

Is there something I can do to troubleshoot this issue? I tried enabling verbose but nothing gets displayed on the console. I have both public and private buckets. My private bucket has 4.67 MB of data in it.

I have also enabled consistency check

theriverman commented 3 years ago

What version of django-minio-backend are you on?

This sounds like a network connection problem. django-minio-backend uses minio-py to make connection to the MinIO server which in fact uses urllib3: https://github.com/minio/minio-py/blob/7ac4a83ede408bfdc461396c9e0a26268dc8f444/minio/api.py#L141-L153

Your problem seems to lie somewhere here assuming that your MINIO_ENDPOINT and related parameters are configured properly.

In the meanwhile, I have added a new settings.py parameter for conveniently defining a custom HTTP client: MINIO_HTTP_CLIENT. Please manually update to the latest beta and consider playing around with custom HTTP client in case you require a proxy to be used.

pip install django-minio-backend==3.1.0b1

See README.md for a minimal example. See Python Client API Reference for a custom urllib3 client with a proxy setting.