Skip to content

Metrics server: a stalled client blocks health endpoints; accept errors busy-loop #99

Description

@lukashes

Two availability defects in the observability HTTP server (http.zig).

  • The serve loop is serial (one request per connection) and receiveHead has no read timeout. A client that connects and sends nothing blocks /healthz and /readyz for everyone. Under Kubernetes a stuck scraper turns into failed liveness probes and process restarts caused by observability itself. Add a read timeout or a per-connection deadline.
  • Any accept error other than Canceled retries immediately and logs at debug only. A persistent error such as EMFILE spins at 100% CPU, invisible in production logs. Log at warn and back off between retries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions