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

Set context timeouts on all exec functions #688

Merged
merged 2 commits into from
Dec 22, 2020

Conversation

directionless
Copy link
Contributor

Reviewing the places we call exec, and attempting to get timeouts on all of them

@@ -12,7 +12,7 @@ import (
)

func mdfind(args ...string) ([]string, error) {
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we see a lot of timeouts for mdfind, will there significant perf impacts to devices by 10x-ing this timeout? Does mdfind use significant CPU? ( it seems like this is a potential CPU hotspot depending on the query)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No clue. I just upped the numbers.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. I don't think we have significant safety nets for other performance sensitive areas, so this is probably in line with current art.

@directionless directionless merged commit b77a613 into kolide:master Dec 22, 2020
@directionless directionless deleted the seph/timeouts branch December 22, 2020 14:49
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.

2 participants