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

add open_timeout to avoid stuck #55

Merged
merged 1 commit into from
Feb 3, 2015
Merged

Conversation

Kaixiang
Copy link
Contributor

Hi:

We found sometime all our threads were blocked while doing emit_points. while the call stack looks like:

 ["/var/vcap/packages/ruby/lib/ruby/2.1.0/net/http.rb:879:in `initialize'",
  "/var/vcap/packages/ruby/lib/ruby/2.1.0/net/http.rb:879:in `open'",
  "/var/vcap/packages/ruby/lib/ruby/2.1.0/net/http.rb:879:in `block in connect'",
  "/var/vcap/packages/ruby/lib/ruby/2.1.0/timeout.rb:76:in `timeout'",
  "/var/vcap/packages/ruby/lib/ruby/2.1.0/net/http.rb:878:in `connect'",
  "/var/vcap/packages/ruby/lib/ruby/2.1.0/net/http.rb:863:in `do_start'",
  "/var/vcap/packages/ruby/lib/ruby/2.1.0/net/http.rb:852:in `start'",
  "/var/vcap/packages/health_monitor/gem_home/ruby/2.1.0/gems/dogapi-1.6.0/lib/dogapi/common.rb:94:in `connect'",
  "/var/vcap/packages/health_monitor/gem_home/ruby/2.1.0/gems/dogapi-1.6.0/lib/dogapi/common.rb:117:in `request'",
  "/var/vcap/packages/health_monitor/gem_home/ruby/2.1.0/gems/dogapi-1.6.0/lib/dogapi/v1/metric.rb:40:in `submit'",
  "/var/vcap/packages/health_monitor/gem_home/ruby/2.1.0/gems/dogapi-1.6.0/lib/dogapi/facade.rb:85:in `emit_points'",
...
]

After checking the code and it seems the open_timeout is default to nil so open timeout exception will not be triggered.
want to add a open_timeout as we do for read_timeout to avoid thread blocks.

PR as follows.

Thanks.

@jens
Copy link

jens commented Feb 3, 2015

We encountered the same problem. The changes in this pull request fixed it for us.

@joe-devries-sp
Copy link

We saw this as well.

conorbranagan added a commit that referenced this pull request Feb 3, 2015
add open_timeout to avoid stuck
@conorbranagan conorbranagan merged commit 2a7438d into DataDog:master Feb 3, 2015
@conorbranagan
Copy link
Member

Sorry for the delay on this one. It's released in v1.15.0

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

Successfully merging this pull request may close these issues.

5 participants