# NautheraServerErrorBudgetBurnSlow

Public requests fail with a 5xx faster than the monthly error budget allows.

## Meaning

The 5xx share of public requests is above 3 times the error budget of
`availabilityObjective` (99.9% by default) over a day and two hours, or above the budget
itself over three days and six hours. Something fails steadily at a low rate: one route,
one client's requests, a flaky dependency or one unhealthy replica.

## Impact

Most users do not notice, but a small share of sign-ins, token requests or admin calls
fail, and some relying parties or users may be hit far more often than the average says.
Left alone, the month's error budget runs out.

## Diagnosis

1. Which routes and statuses over the day: `sum by (route, code)
   (increase(nauthera_http_requests_total\{job="&lt;name&gt;",code=~"5.."\}[1d]))`.
2. Whether one replica stands out: `sum by (pod)
   (rate(nauthera_http_requests_total\{job="&lt;name&gt;",code=~"5.."\}[1h]))`.
3. Cache and database error rates over the same window:
   `sum by (op) (rate(nauthera_cache_operations_total{job="<name>",result="error"}[1h]))`
   and `nauthera_dependency_up{job="<name>"}`.
4. Read a sample of the failing requests: `kubectl -n &lt;ns&gt; logs deploy/&lt;name&gt; | jq
   'select(.msg=="http_request" and .status&gt;=500)'`, then follow their `request_id`.

## Mitigation

- One replica: delete the pod and watch whether the replacement behaves.
- A flaky dependency: fix it with its owner; follow NautheraCacheErrors or
  NautheraDatabasePoolExhausted if they fire too.
- One route since a release: roll back, or pin the regression for an upstream fix.

## Escalation

No page; handle it in working hours. Escalate to the identity platform owner if the cause
is not found within a day. Open an issue when the 5xx come from the server with healthy
dependencies, with the route, status, sample `request_id`s with their log lines and the
server version (`nauthera_build_info`).

---

[Alert runbooks](https://www.nauthera.io/docs/v1/runbooks/alerts) · Generated from [`internal/runbook/alerts.yaml`](https://github.com/nauthera/nauthera-server/blob/main/internal/runbook/alerts.yaml) and [`operator/internal/runbook/alerts.yaml`](https://github.com/nauthera/nauthera-server/blob/main/operator/internal/runbook/alerts.yaml) in nauthera-server.
