Skip to content

Conversation

@sjmonson
Copy link
Collaborator

@sjmonson sjmonson commented Nov 25, 2025

Summary

By default each httpx client supports a maximum of 100 connections (ref). We want this uncapped as connection count is maintained by a semaphore.

Test Plan

Related Issues


  • "I certify that all code in this PR is my own, except as noted below."

Use of AI

  • Includes AI-assisted code completion
  • Includes code generated by an AI application
  • Includes AI-generated tests (NOTE: AI written tests should have a docstring that includes ## WRITTEN BY AI ##)

@sjmonson sjmonson added this to the v0.4.1 milestone Nov 25, 2025
@sjmonson sjmonson marked this pull request as draft November 25, 2025 21:26
@jaredoconnell
Copy link
Collaborator

This change will reduce the keepalive from the default of 5 seconds to a half of a second. Do you anticipate any side effects from the shortened keepalive?

@sjmonson
Copy link
Collaborator Author

sjmonson commented Dec 3, 2025

This change will reduce the keepalive from the default of 5 seconds to a half of a second. Do you anticipate any side effects from the shortened keepalive?

I don't know. Need to come up with some manual tests to verify that this is ok. Since max_keepalive is set to None, the intention is that either the connection gets reused immanently or we expire it to avoid holding a large number of idle connections. max_keepalive is None because the default is 20 and I feel that is too low for our use-case. Setting it to any other number seems arbitrary.

@sjmonson sjmonson force-pushed the fix/connection_limit branch 3 times, most recently from fc8b7d5 to d34b8db Compare December 5, 2025 18:32
@sjmonson sjmonson force-pushed the fix/connection_limit branch from d34b8db to abbc62c Compare December 5, 2025 20:36
@sjmonson sjmonson marked this pull request as ready for review December 5, 2025 20:36
@sjmonson sjmonson merged commit adfa108 into main Dec 5, 2025
15 checks passed
@sjmonson sjmonson deleted the fix/connection_limit branch December 5, 2025 21:06
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

Successfully merging this pull request may close these issues.

Per-worker concurrency is capped at 100

3 participants