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

[sqlserver] fix collector hangs when a connection is failing #1640

Merged
merged 1 commit into from
Jun 3, 2015

Conversation

yannmh
Copy link
Member

@yannmh yannmh commented May 26, 2015

SQLServer check hangs the collector when a connection is failing.
Default timeout is set to 30s, but it is raised multiple times for the same instance: after 120s, collector is restarted by the watchdog and loops back.
Solution: cache failing connections.

@yannmh yannmh self-assigned this May 26, 2015
@yannmh yannmh added this to the 5.4.0 milestone May 26, 2015
@yannmh yannmh added the bugfix label May 26, 2015
@remh
Copy link
Contributor

remh commented May 29, 2015

Does that mean that as soon as one connection fails, the check won't collect any metrics until a restart of the agent ?

SQLServer check hangs the collector when a connection is failing.
Default timeout is set to 30s, but it is raised multiple times for the same
instance: after 120s, collector is restarted by the watchdog and loops
back.
Solution: cache failing connections at initialization.
@yannmh
Copy link
Member Author

yannmh commented Jun 1, 2015

I added a few changes.
Failure connections are now cached at initialization only: in this case, the check would not collect any metrics until the agent is restarted. Please note that this is also the current behavior, as the list of metrics to collect is set at this time.

If the check initialization ran fine, but the connection is failing afterwards, we'll keep retrying at every check run: the downside is that it slows down the collector since it takes 30seconds to timeout.

@remh
Copy link
Contributor

remh commented Jun 3, 2015

Looks good!

remh added a commit that referenced this pull request Jun 3, 2015
[sqlserver] fix collector hangs when a connection is failing
@remh remh merged commit 6ed6edf into master Jun 3, 2015
@yannmh yannmh deleted the yann/fix-sqlserver-hangs branch June 9, 2015 19:30
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling c57640f on yann/fix-sqlserver-hangs into ** on master**.

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

Successfully merging this pull request may close these issues.

3 participants