Skip to content

Unable to Configure Connection Pool Size in python-keycloak #630

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

Open
dawsarjomaa007 opened this issue Jan 16, 2025 · 1 comment
Open

Unable to Configure Connection Pool Size in python-keycloak #630

dawsarjomaa007 opened this issue Jan 16, 2025 · 1 comment

Comments

@dawsarjomaa007
Copy link

dawsarjomaa007 commented Jan 16, 2025

Context:
I am using the python-keycloak library in a FastAPI-based user management application. Some of the functionalities in my application require parallel processing. During execution, I encountered the following warning:

WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: auth.************.com. Connection pool size: 10

After some investigation, I determined that the KeycloakAdmin class from the python-keycloak library relies on urllib3 under the hood for HTTP requests. However, I couldn't find any documentation or examples showing how to configure the connection pool size for urllib3 when using this library.

Expected Behavior:
I would like to:

  1. Configure the connection pool size for urllib3 to handle the parallel processing requirements in my application.
  2. Understand if there is an existing way to adjust the connection pool size in python-keycloak, or if this functionality needs to be added.

Thank you for your support!

@ryshoooo
Copy link
Collaborator

ryshoooo commented Feb 3, 2025

Hi @dawsarjomaa007

Thanks for the suggestion! As far as I'm aware, right now it is not possible to easily set the connection pool size. It would only be possible by manually overriding or patching (mocking) the existing connection manager and its session(s). Therefore this functionality needs to be added.

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

No branches or pull requests

2 participants