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 timeout on metric HTTP requests #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ivgiuliani
Copy link
Contributor

By default, neither webrick or rack will timeout http requests. This
means that if a request to /metrics or /queue/metrics takes longer
than the scrape_timeout, we risk backing up requests for metrics and
eventually overloading the worker.

This adds rack-timeout to force the request to exit after the default
timeout of 30 seconds (but it can be changed either by setting
RACK_TIMEOUT_SERVICE_TIMEOUT to a different value or by the
--metrics-request-timeout options flag when starting the worker).

By default, neither webrick or rack will timeout http requests. This
means that if a request to `/metrics` or `/queue/metrics` takes longer
than the `scrape_timeout`, we risk backing up requests for metrics and
eventually overloading the worker.

This adds rack-timeout to force the request to exit after the default
timeout of 30 seconds (but it can be changed either by setting
`RACK_TIMEOUT_SERVICE_TIMEOUT` to a different value or by the
`--metrics-request-timeout` options flag when starting the worker).
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