| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
⚠️ Please install the Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #6929 +/- ##
=======================================
Coverage 49.06% 49.06%
=======================================
Files 433 433
Lines 54314 54316 +2
Branches 7912 7912
=======================================
+ Hits 26647 26649 +2
Misses 25788 25788
Partials 1879 1879
Continue to review full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
…read
The metrics HTTP server runs as a thread in the Gunicorn master, which
forks the workers. Its default WSGIRequestHandler writes an access-log
line to stderr for every scrape. A fork while that thread holds the
stderr buffer lock leaves the new worker with the lock held forever: it
blocks on its first log line ("Booting worker") and never serves.
Use a request handler with a no-op log_message for both the IPv4 and
the dual-stack server built by _make_metrics_httpd, like
prometheus_client's own _SilentHandler.
Fixes feast-dev#6928
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Alexandr Borgatin <a.borgatin@yandex.ru>
| Back | FazBrowse Home | New Git URL |
What this PR does / why we need it:
The metrics HTTP server runs as a thread in the Gunicorn master, which forks the workers. Its default WSGIRequestHandler writes an access-log line to stderr for every scrape. A fork while that thread holds the stderr buffer lock leaves the new worker with the lock held forever: the worker blocks on its first log line ("Booting worker") and never serves a request. Details, stacks and a reproduction in #6928 (same class of problem as #6647).
This adds _QuietWSGIRequestHandler (no-op log_message, like prometheus_client's own _SilentHandler) and uses it for both the IPv4 and the dual-stack server built by _make_metrics_httpd. Scrapes are no longer written to stderr; nothing else changes.
Tested on Kubernetes with --max-requests 20 and a scrape storm: 5 hangs in 318 forks before, 0 hangs in 2,000 forks after. Locally (steps in #6928): a hang after 12–29 forks before, none in 336 forks after.
Which issue(s) this PR fixes:
Fixes #6928
Checks
Testing Strategy
🤖 Generated with Claude Code