Skip to content

PMM-2726: Abort on timeout. #34

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

Merged
merged 4 commits into from
Sep 12, 2018
Merged

PMM-2726: Abort on timeout. #34

merged 4 commits into from
Sep 12, 2018

Conversation

arvenil
Copy link

@arvenil arvenil commented Aug 30, 2018

Abort data collection:

  • when connection gets closed
  • on prometheus scrape timeout X-Prometheus-Scrape-Timeout-Seconds
    • give exporter time to finish and send data with --timeout-offset. Default 0.5 second.

Tested manually. Returns metrics even if scraping was canceled. Example errors:

ERRO[0014] Error scraping for collect.global_status: context deadline exceeded  source="exporter.go:104"
ERRO[0014] Error scraping for collect.info_schema.innodb_metrics: context deadline exceeded  source="exporter.go:104"

Based on https://github.com/prometheus/blackbox_exporter/blob/master/main.go#L74-L83

Upstream PR: prometheus#323

@arvenil arvenil force-pushed the PMM-2726_abort_on_timeout branch from 46d9637 to 4bd55cb Compare August 30, 2018 12:36
@arvenil arvenil force-pushed the PMM-2726_abort_on_timeout branch from 4bd55cb to f48d09d Compare August 30, 2018 12:37
@arvenil arvenil force-pushed the PMM-2726_abort_on_timeout branch from 240a3a6 to 1a016b9 Compare September 6, 2018 15:48
@arvenil arvenil requested review from rnovikovP and AlekSi September 6, 2018 16:05
Copy link

@AlekSi AlekSi left a comment

Choose a reason for hiding this comment

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

Sorry, missed that one. :shipit:

@AlekSi AlekSi merged commit 8f50ba4 into master Sep 12, 2018
@AlekSi AlekSi deleted the PMM-2726_abort_on_timeout branch September 12, 2018 05:33
@arvenil
Copy link
Author

arvenil commented Sep 21, 2018

Affected by go-sql-driver/mysql#858; we may need to disable global pool temporarily.

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.

3 participants