I am setting timeout to 300 seconds (to test an AWS lambda function + API Gateway), but HTTPie continues to timeout at 30 seconds. Is there an upper limit set at 30 seconds? I'麓m using
http --timeout=300 POST https://...
30 is the default timeout set, not the upper limit.
For some reason, httpie
is not using the timeout I specify and times out at 30 seconds...
$ http --timeout=300 POST https://...
HTTP/1.1 504 Gateway Timeout
Connection: keep-alive
Content-Length: 41
Content-Type: application/json
Date: ...
{
"message": "Endpoint request timed out"
}
I tried this with --timeout=300
and --timeout 300
(which should not make a difference, but I wanted to make sure) and the results are the same: it times out at 30 seconds. The function call should take around 2 minutes (120 seconds), but it never gets past the 30 seconds.
This is not httpie
timing out. You're receiving a response that tells you the intermediary between you and your lambda function is timing out the request. --timeout
is from your computer to that intermediary. The intermediary can set whatever timeout it wants from itself to your lambda function. This is firmly not an HTTPie bug.
Actually this is an issue with httpie. My gunicorn timeout is 90s and httpie is still stopping at 30s... I know gunicorn isn't timing out because a few seconds after httpie dies I see the server output results in the log.
@gnulnx there's a default 30s _connection_ timeout which you can change via --timeout=n
.
(The default timeout will be removed in v2.0.0.)
Most helpful comment
This is not
httpie
timing out. You're receiving a response that tells you the intermediary between you and your lambda function is timing out the request.--timeout
is from your computer to that intermediary. The intermediary can set whatever timeout it wants from itself to your lambda function. This is firmly not an HTTPie bug.