httpx broke ollama being used within multiple event loops #189

Open
opened 2026-02-15 16:28:34 -05:00 by yindo · 3 comments
Owner

Originally created by @Oscaner on GitHub (Dec 21, 2024).

Originally assigned to: @ParthSareen on GitHub.

AsyncClient does not support being used within multiple event loops
https://github.com/encode/httpx/issues/2058

Originally created by @Oscaner on GitHub (Dec 21, 2024). Originally assigned to: @ParthSareen on GitHub. AsyncClient does not support being used within multiple event loops https://github.com/encode/httpx/issues/2058
Author
Owner

@Oscaner commented on GitHub (Dec 21, 2024):

Workaround:
using {"headers": {"Connection": "close"}} to disable TCP sharing.
https://github.com/encode/httpx/discussions/2959#discussioncomment-7665278

@Oscaner commented on GitHub (Dec 21, 2024): Workaround: using `{"headers": {"Connection": "close"}}` to disable TCP sharing. https://github.com/encode/httpx/discussions/2959#discussioncomment-7665278
Author
Owner

@Oscaner commented on GitHub (Dec 21, 2024):

Link: https://github.com/stripe/stripe-python/pull/1248

@Oscaner commented on GitHub (Dec 21, 2024): Link: https://github.com/stripe/stripe-python/pull/1248
Author
Owner

@ParthSareen commented on GitHub (Dec 29, 2024):

Hey @Oscaner thanks for reporting - will check this out

@ParthSareen commented on GitHub (Dec 29, 2024): Hey @Oscaner thanks for reporting - will check this out
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#189