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

Feature Request: Ability to adjust niquest session pool size #189

Open
sjoeboo opened this issue Oct 18, 2024 · 5 comments
Open

Feature Request: Ability to adjust niquest session pool size #189

sjoeboo opened this issue Oct 18, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@sjoeboo
Copy link
Contributor

sjoeboo commented Oct 18, 2024

I've got a service which is fairly busty in terms of traffic. I was manually managing the Grafana connections but your client simplifies things a great deal. However I'm now seeing issues where my traffic is overwhelming the default niquest connection pool:

urllib3.util.traffic_police.OverwhelmedTraffic: Cannot select a disposable connection to ease the charge

Which according to:
https://niquests.readthedocs.io/en/v3.5.3/community/faq.html#what-are-overwhelmedtraffic-errors

is something that can be set when setting up the session (I assume here https://github.com/grafana-toolbox/grafana-client/blob/main/grafana_client/client.py#L120 and https://github.com/grafana-toolbox/grafana-client/blob/main/grafana_client/client.py#L244C9-L244C15)

Would love the ability to set this when creating the client (I could scale my service but seems wasteful in terms of resources when a larger pool would really fix my issue in the first place)

@amotl
Copy link
Contributor

amotl commented Oct 18, 2024

Hi @sjoeboo,

thanks for submitting GH-190, I think it is the right choice instead of scaling your service.

With kind regards,
Andreas.

/cc @Ousret

@amotl amotl added the enhancement New feature or request label Oct 18, 2024
@amotl
Copy link
Contributor

amotl commented Oct 18, 2024

I've just merged GH-190, and will run a release right away. Before closing this ticket, it makes sense to add a corresponding paragraph to the documentation about the new feature.

Update: Version 4.2.0 has been released, including your improvement. Thanks again!

@amotl
Copy link
Contributor

amotl commented Oct 18, 2024

it makes sense to add a corresponding paragraph to the documentation about the new feature.

May I ask you to add a relevant section to the README in retrospective, @sjoeboo? The right spot would probably be to add a dedicated subsection to the "Configuration Settings" section. Their titles are sorted alphabetically, as per a630b7c.

@sjoeboo
Copy link
Contributor Author

sjoeboo commented Oct 18, 2024

#193

@amotl
Copy link
Contributor

amotl commented Oct 18, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants