-
Notifications
You must be signed in to change notification settings - Fork 813
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
[mongo] make timeout configurable and increase the default #1823
Conversation
Thanks for contributing @benmccann ! Yes, let's assess this change for the 5.5.0 agent release. Out of curiosity, do you know long the check takes to connect to your instance ? |
Normally it connects very quickly. But it looks like every so often there's some job that's just pounding our instance with unoptimized queries, and so when that happens we're seeing it take about 15s. |
Can we make it configurable instead ? |
Making it configurable sounds reasonable. I'd still like to increase the default since I think it's lower than it needs to be. Do you have an example of how we'd make it configurable? E.g. is there a certain file we'd edit to set the config value? And then would we read it from init_config or agentConfig? |
etcd is a good example. I agree that we can increase the default timeout as well, although 60secs seems a bit excessive. Does 20 secs seem reasonable ? Thanks again for the feedback and the PR! |
Would there be any problems caused by having the timeout be too high? Seems like it doesn't cost us much to make it higher. I'd settle for 30 secs ;-) We were taking about 15 secs to connect, which is dangerously close to 20 secs. |
9b61182
to
9b34c0e
Compare
Having a connection hanging for too long can triggers the watchdog that would kill and restart the agent. So we are still fine with 30 secs but it's something we have to be cautious with :) Thanks again for this! |
08deb81
to
1444eb7
Compare
Thanks a lot @benmccann, tests should be passing now 🎉. Since we can now set this Also, we recently introduced some contribution guidelines to keep a nice, homogeneous, and easy to browse git history. |
1444eb7
to
c7e1c91
Compare
Thanks @yannmh. I rebased to get the fix for the network tests and updated the commit message. Regarding the |
Yep, all tests are passing now! Thanks guys! |
Thanks for the further explanations @benmccann. Let's keep it at 30s then. Merging 🚀 ! |
[mongo] make timeout configurable and increase the default
We have one MongoDB instance that's misbehaving. It's a bit slow to connect to it because of the problems it's having and so it's difficult to tell what's wrong because we're not getting any metrics from it.