The Fix
pip install urllib3==2.2.0
Based on closed urllib3/urllib3 issue #1741 · PR/commit linked
Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.
@@ -101,10 +101,6 @@ class Timeout:
of 20 seconds will not trigger, even though the request will take
several minutes to complete.
-
- If your goal is to cut off any request after a set amount of wall clock
- time, consider having a second "watcher" thread to cut off a slow
Option A — Upgrade to fixed release\npip install urllib3==2.2.0\nWhen NOT to use: This fix is not applicable if the documentation needs to suggest alternative timeout management strategies.\n\n
Why This Fix Works in Production
- Trigger: The documentation of the [`timeout`](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html#module-urllib3.util.timeout) module says:
- Mechanism: The documentation incorrectly suggested using a watcher thread to manage request timeouts
- Why the fix works: Removed the suggestion of using a watcher thread to cut off slow requests from the documentation. (first fixed release: 2.2.0).
- If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.
Why This Breaks in Prod
- The documentation incorrectly suggested using a watcher thread to manage request timeouts
- Production symptom (often without a traceback): The documentation of the [`timeout`](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html#module-urllib3.util.timeout) module says:
Proof / Evidence
- GitHub issue: #1741
- Fix PR: https://github.com/urllib3/urllib3/pull/3264
- First fixed release: 2.2.0
- Reproduced locally: No (not executed)
- Last verified: 2026-02-09
- Confidence: 0.85
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.68
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“There is a way, without using second thread. First you should use Timeout(read=...) to limit time on reading one network chunk, second you should read…”
“Also you can use gevent instead of native threads and wrap network operations into gevent.Timeout”
“This is a great question”
Failure Signature (Search String)
- The documentation of the [`timeout`](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html#module-urllib3.util.timeout) module says:
- (This is actually a benefit of libraries based on async I/O such as trio, they support such global timeouts natively without needing cooperation from the HTTP library.)
Copy-friendly signature
Failure Signature
-----------------
The documentation of the [`timeout`](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html#module-urllib3.util.timeout) module says:
(This is actually a benefit of libraries based on async I/O such as trio, they support such global timeouts natively without needing cooperation from the HTTP library.)
Error Message
Signature-only (no traceback captured)
Error Message
-------------
The documentation of the [`timeout`](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html#module-urllib3.util.timeout) module says:
(This is actually a benefit of libraries based on async I/O such as trio, they support such global timeouts natively without needing cooperation from the HTTP library.)
What Broke
Users experienced confusion and potential misuse due to misleading documentation on request timeouts.
Why It Broke
The documentation incorrectly suggested using a watcher thread to manage request timeouts
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install urllib3==2.2.0
Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.
Fix reference: https://github.com/urllib3/urllib3/pull/3264
First fixed release: 2.2.0
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix is not applicable if the documentation needs to suggest alternative timeout management strategies.
Did This Fix Work in Your Case?
Quick signal helps us prioritize which fixes to verify and improve.
Prevention
- Add a CI check that diffs key outputs after upgrades (OpenAPI schema snapshots, JSON payload shapes, CLI output).
- Upgrade behind a canary and run integration tests against the canary before 100% rollout.
- Make timeouts explicit and test them (unit + integration) to avoid silent behavior changes.
- Instrument retries (attempt count + reason) and alert on spikes to catch dependency slowdowns.
Version Compatibility Table
| Version | Status |
|---|---|
| 2.2.0 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.