txacme icon indicating copy to clipboard operation
txacme copied to clipboard

Overall API response timeout

Open mithrandi opened this issue 8 years ago • 0 comments

Hypothesis: treq has a timeout for getting the request, but neither treq nor Agent have a timeout for reading the body. If the network falls over here, txacme might be stuck waiting literally forever.

I have not actually proven this hypothesis yet.

In the general case this is tricky to solve since you want a "time since last received data" or something, not a flat timeout, but in our case we can happily throw a 60 second flat timeout on top of the API client.

Unfortunately it is not possible to properly implement this because of an issue with readBody cancellation, but at least certificate issuing won't grind to a halt. (Until you run out of file descriptors. Sigh.)

mithrandi avatar Dec 14 '16 03:12 mithrandi