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

Configurable connection pool size in azure.storage package #35456

Closed
bertek41 opened this issue May 2, 2024 · 8 comments
Closed

Configurable connection pool size in azure.storage package #35456

bertek41 opened this issue May 2, 2024 · 8 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed The Azure SDK team member assisting with this issue believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@bertek41
Copy link

bertek41 commented May 2, 2024

  • 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"),
        ),
    )
@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files) labels May 2, 2024
Copy link

github-actions bot commented May 2, 2024

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

@pvaneck
Copy link
Member

pvaneck commented May 3, 2024

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.

@pvaneck pvaneck added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels May 3, 2024
Copy link

github-actions bot commented May 3, 2024

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.

@bertek41
Copy link
Author

bertek41 commented May 3, 2024

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.

@github-actions github-actions bot added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels May 3, 2024
@swathipil
Copy link
Member

swathipil commented May 6, 2024

Hi @bertek41 - The transport parameter accepts should take in a Transport object such RequestsTransport as shown here, rather than a string. For a list of other Transport classes supported, please refer to this documentation.

As @pvaneck mentioned, a snippet of code that shows how you are creating your client and specifying pooling configuration would allow us to better assist.

@swathipil swathipil added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels May 6, 2024
@github-actions github-actions bot added the needs-team-attention This issue needs attention from Azure service team or SDK team label May 6, 2024
Copy link

github-actions bot commented May 6, 2024

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.

@bertek41
Copy link
Author

bertek41 commented May 8, 2024

I figured out. If I use BlobServiceClient like this:

    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"),
        ),
        transport=...
    )

Nothing changes. But when I use like this:

BlobServiceClient.from_connection_string(AZURE_CONNECTION_STRING, transport=...)

Service does use transport.

@github-actions github-actions bot removed the needs-author-feedback More information is needed from author to address the issue. label May 8, 2024
@xiangyan99 xiangyan99 added the issue-addressed The Azure SDK team member assisting with this issue believes it to be addressed and ready to close. label May 16, 2024
@github-actions github-actions bot removed the needs-team-attention This issue needs attention from Azure service team or SDK team label May 16, 2024
Copy link

Hi @bertek41. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed The Azure SDK team member assisting with this issue believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

6 participants