Missing timeout for external requests
Many modules use the requests
module to perform external HTTP requests. But they are all missing a timeout as suggested by the documentation.
So if the external service is not responding, the transaction could last for ever.
I propose to add configuration settings to each module named requests_timeout
with a default value of 300
. I think it is a pretty good default setting for most of the operations.
There are two exceptions for which I do not think we need to set such timeout configuration, it is the stripe and braintree library which already has their own default timeout setup by the provider. So I think we can rely on them to be good default and not need to be customized (which could still be with code).