Repository navigation
Description
#645 reduced the er-dispatcher resources in infra/k8s/charts/er-platform/values.yaml, and the new numbers were justified by reasoning, not measured. They should be confirmed before anyone trusts them in prod.
| setting | was | now | why it was lowered |
|---|---|---|---|
terminationGracePeriodSeconds |
300 | 60 | the 300s existed because "a killed legacy run strands its row holding the dataset's writer lock". With the arm gone, planning is one transaction that rolls back to queued, the work is in Jobs that outlive the pod, and Executor::adopt re-stamps owner_epoch on both the job and its task rows — so the next dispatcher takes over instead of leaving it for an operator |
requests.memory |
512Mi | 256Mi | the dispatcher opens no lake: the schema reconcile moved to reconcile_schema/init on the task path, and dags/control/mod.rs may not link engine code |
limits.memory |
3Gi | 768Mi | the 3Gi was the API container's defensive ceiling, justified by "runs whole legacy pipelines in-process (DuckDB included)" |
What to check
- The grace period is enough. What a SIGTERM can now interrupt is one pass of Postgres writes plus, at worst, one SES send and a webhook drain. Confirm a dispatcher restart under load drains inside 60s and strands nothing — a row left
dispatching/runningwith no owner epoch is the failure. - 768Mi is enough headroom. DuckDB is still linked into the shared multicall image even though nothing on this arm calls it, so the RSS floor is not obviously small. Watch
container_memory_working_set_bytesforer-dispatcheracross a busy period; an OOMKill here stops all dispatch. - If either is wrong, raise it in the chart with the measurement recorded in the comment — the current comment argues from mechanism, which is what this issue exists to replace.
Refs #645.
Product context (2026-11-26)
Why this matters for the API product: The dispatcher is the single replica (Recreate) that turns every API-submitted job into work. If it's OOMKilled or a restart strands rows, every customer's run step stops. This protects operate safely.
Current state: Nothing has been measured since the ticket was filed.
infra/k8s/charts/er-platform/values.yaml:162-178still sets grace to 60s, requests to 256Mi and limits to 768Mi. The comment still argues from mechanism.values-prod.yamldoesn't override it.values-kind.yaml:45-47requests 512Mi, which is above the default request. The reason isn't recorded.- The dispatcher has picked up work since Phase 4 — delete the legacy in-process dispatch arm #645: DuckFleet remote-attempt recovery (feat(duckfleet): recover remote attempts from evidence, never replay #1157,
duckfleet_tasks.rs), class templates (Observe an L-class run as three Jobs across two node classes #649) and the operational snapshots (feat(observability): add operational dashboards and alerts (#552) #1046/feat(observability): alert on pending pods and oldest queued jobs (#1050) #1051). Whether these change its RSS is unverified. - Indirect detection exists. The
queue-oldest,operational-snapshot-missingandpod-snapshot-missingalarms (infra/terraform/modules/operational-observability/main.tf:5, 128, 164) would fire if the dispatcher died. Nothing alarms on dispatcher OOMKill or restart count directly. - One mail-related reason for the grace period (the SES send) is now pruned scope, but the code is still there.
Definition of done: As above. Add a measured peak container_memory_working_set_bytes from a window that includes at least one multi-task run per class, and one deliberate mid-run dispatcher restart that leaves no dispatching/running row without an owner epoch. Record both in the values.yaml comment.
Dependencies / sequencing: #558's 10M run is a good busy window. Related: #530.
Size: About 0.5 engineer-weeks.
Activity
chore(chart): the dispatcher's grace period and memory, measured (#820)…
docs(api): the person × account support matrix, each red cell a ticket (