edgurgel / edgurgel/httpoison

Confusion around when to use timeout vs recv_timeout

Open
#215 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
2.3k
Forks
349
PR merge metrics
No merged PRs in 30d

Description

Getting ` {:error, %HTTPoison.Error{id: nil, reason: :timeout}}` in about 6 seconds with my options set as `[timeout: 30_000]`. After much digging and confusion, it seems that the timeout is stemming from `recv_timeout` being too low. I found this confusing for 2 reasons:
1) `reason: :timeout` is reported, which suggests that the `timeout` is the appropriate option to adjust.
2) The docs around `timeout` vs `recv_timeout` are pretty vague... I'm still not sure exactly what each one does and how they are different.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the documentation for the timeout and recv_timeout options and the error output showing reason: :timeout. Clarify how the two options differ and which behavior each controls, then verify that the documented explanation matches the reported six-second timeout scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.