Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reasonable Timeout Limit #323

Open
zinosama opened this issue May 8, 2020 · 1 comment
Open

Reasonable Timeout Limit #323

zinosama opened this issue May 8, 2020 · 1 comment

Comments

@zinosama
Copy link

zinosama commented May 8, 2020

Hello Slack Team,

I'm not sure if this is the right forum for this question, but for users of this gem, is there a recommended setting for timeout?

I have an internal app that sends messages to my workspace via chat_postMessage when certain internal events happen (sending a dozen of messages per minute). My current open and read timeouts are both set at 3 seconds. Everyday, I see a handful of Faraday::ConnectionFailed being thrown, which then resolves themselves upon retry. Is 3 second a reasonable timeout? Please feel free to point me to any official doc or share some recommendations/best practices around this.

Thank you very much for your time and attention!

@dblock
Copy link
Collaborator

dblock commented May 8, 2020

Hello Slack Team,

I don't believe anyone here works for slack.

Are you reusing a connection? Try HEAD with #322 and this:

require 'net/http/persistent'

Faraday.default_adapter = Faraday::Adapter::NetHttpPersistent

It should reduce the number of times your client need to connect and therefore will have fewer or no timeouts.

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

No branches or pull requests

2 participants