Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Faraday's open_timeout not configurable and defaults to 60 seconds! #30

Open
andrewferk opened this issue Dec 15, 2016 · 3 comments
Open
Milestone

Comments

@andrewferk
Copy link

If for any reason the Azure Storage service cannot be reached, the Faraday client will not timeout until after 60 seconds and this is not configurable.

open_timeout is set in azure-ruby-asm-core, and I don't know of I way to have it already set. I would prefer this to be defined by an environment variable.

It looks like it was addressed in April, but for some reason it was decided 60 seconds was a good timeout value.

@sarangan12
Copy link
Member

@yaxia Can you take a look at this issue and share your thoughts about making this value configurable?

@yaxia
Copy link
Member

yaxia commented Jan 10, 2017

The value is configurable from the option parameter when creates the Faraday object. In my opinion, either read the value from an option or an environment variable is OK. But this should be the call of the implementation of the HTTP client.

Since the open_timeout is more like a per connection setting instead of a global setting from a library's perspective, I'd prefer keep the current implementation and leave the flexibility to the user to decide how the client will provide the connection options, setting from code or reading from environment variables. As a reference, the Azure Storage client implements its own way of creating a Faraday object, by reading the CA file path from code and proxy settings from the environment variables.

BTW, the default value of 60 seconds is from the Ruby implementation, NET::Http, open_tiumeout attribute.

+@veronicagg for more comment.

@veronicagg veronicagg added this to the ASM-Core Next milestone Jan 25, 2017
@veronicagg
Copy link
Contributor

I agree that we're currently not providing a way to configure open_timeout. We're not planning to address this issue soon though, we'd be happy to review a PR if one is submitted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants