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 support for timeouts #43

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add support for timeouts #43

wants to merge 3 commits into from

Conversation

bnu0
Copy link

@bnu0 bnu0 commented Jan 29, 2021

Description

Currently, the exporter will hang forever on a hung php-fpm that is not accepting on the socket or is not replying with a status page. You can reproduce this by e.g. sending SIGSTOP to the php-fpm processes and seeing that the exporter never reports a failure, rather prometheus starts timing out trying to scrape it.

PR Overview

  • Adds a --status.timeout (env var STATUS_TIMEOUT) cli flag, defaults to 0 which means no timeout and is the current behavior.
  • Uses this timeout in HTTP client
  • Uses this timeout in FCGI client
    • NOTE: we replace github.com/tomasen/fcgi_client => github.com/kanocz/fcgi_client in go.mod to get a forked fcgi_client module that also supports timeouts. This is basically including Add read/write timeouts tomasen/fcgi_client#12 as a net result.

Benjamin Ullian added 3 commits January 29, 2021 10:55
…orter waiting forever on a hung php-fpm.

Signed-off-by: Benjamin Ullian <bnu@tumblr.com>
Signed-off-by: Benjamin Ullian <bnu@tumblr.com>
Signed-off-by: Benjamin Ullian <bnu@tumblr.com>
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.

1 participant