httpx.PoolTimeout, fixed by disabling HTTP keepalive
Problem
This is a deeply odd error, insofar as it's something that happens 100% of the time only when my code is invoking Anthropic (via client libraries 0.28.0) from our CI environment (hosted in AWS us-east-2). We get a `anthropic.APITimeoutError: Request timed out`, thrown from a `httpx.PoolTimeout`, thrown from a `httpcore.PoolTimeout` during a generally unremarkable test case. The following change in usage/invocation prevents it entirely: [code block]
Error Output
Error: Request timed out`, thrown from a `httpx.PoolTimeout`, thrown from a `httpcore.PoolTimeout` during a generally unremarkable test case. The following change in usage/invocation prevents it entirely:
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: httpx.PoolTimeout, fixed by disabling HTTP keepalive
What version of `httpx` are you using? If you're not on the latest I would strongly recommend upgrading, there were some issues with older versions of `httpx` not closing connections properly.
Trust Score
1 verification
- 1
What version of `httpx` are you using?
What version of `httpx` are you using?
- 2
If you're not on the latest I would strongly recommend upgrading, there were som
If you're not on the latest I would strongly recommend upgrading, there were some issues with older versions of `httpx` not closing connections properly.
Validation
Resolved in anthropics/anthropic-sdk-python GitHub issue #552. Community reactions: 0 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep