psf / psf/requests

Raising readtimeout instead of connecttimeout

Open
#5,544 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
54.3k
Forks
10.4k
Avg merge
16h 43m
Merged PRs (30d)
3

Description

My timeout is set to (1,10) AKA connect=1, read=10 and when it times out, I can see either:

HTTPSConnectionPool(host='cloud-collector.newrelic.com', port=443): Read timed out. (read timeout=10)

or

HTTPSConnectionPool(host='cloud-collector.newrelic.com', port=443): Read timed out. (read timeout=1)

Screenshot 2020-07-30 at 16 36 08

The second one looks like definitely a connect timeout and should mention connect instead of read. Currently it's possibly making one believe that the timeouts are not being applied correctly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source files or tests. Reproduce the problem with a (1, 10) timeout against a delayed connection, then trace how the timeout exception is selected; done means connection failures report a connect timeout while response delays report a read timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.