Azure/azure-sdk-for-python

Configurable connection pool size in azure.storage package

bertek41 opened this issue · 7 comments

  • Package Name: azure-storage-blob, azure-identity
  • Package Version: 12.19.1 - 1.15.0
  • Operating System: Ubuntu
  • Python Version: 3.10.12

Describe the bug
I've seen configurable pool_size in here #12102 but I am using BlobServiceClient and this doesn't work for here.

To Reproduce
Steps to reproduce the behavior:
initialize with BlobServiceClient.
Have a 10 threads.
And simultaneously execute #get_blob_client#upload_blob

Errors:

WARNING:urllib3.connectionpool:Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0f5be97a30>: Failed to establish a new connection: [Errno 111] Connection refused')': /session/**HIDDEN**/url
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: localhost. Connection pool size: 1

My BlobServiceClient

    BlobServiceClient(
        AZURE_ACCOUNT_URL,
        credential=ClientSecretCredential(
            client_id=os.getenv("AZURE_CLIENT_ID"),
            client_secret=os.getenv("AZURE_CLIENT_SECRET"),
            tenant_id=os.getenv("AZURE_TENANT_ID"),
        ),
    )

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jalauzon-msft @vincenttran-msft.

Hey @bertek41, how are you specifying your pooling configuration? I believe you should be able to supply your own transport to the BlobServiceClient as shown here.

Hi @bertek41. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

Hey @bertek41, how are you specifying your pooling configuration? I believe you should be able to supply your own transport to the BlobServiceClient as shown here.

I tried the transport parameter, but no matter what I type, nothing changes. I even gave str to the transport parameter, it didn't give any warning, I don't think it worked.