Skip to content

fix(server): a read stopped at the statement limit fails alone, not as a control database outage - #1733

Merged
kvlonge merged 1 commit into
mainfrom
fix/read-timeout-health
Nov 30, 2026
Merged

kvlonge merged 1 commit into
mainfrom
fix/read-timeout-health

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Why

On a Postgres control database, a slow page read (a large run's statement list) hit the 5-minute statement_timeout. Every cancelled statement was kept as a cut-off session, so the health probe marked the whole control database failing and every page showed "isn't available", although the database and scheduler were fine.

Changes

  • A statement PostgreSQL cancels at its statement limit inside a read transaction is now that read's own error, ReadTimedOut. It is not kept as a cut-off session, so health and platform events stay as they were.
  • Write and migration timeouts, idle-in-transaction cut-offs, and a timeout on the health probe's own read are still reported as before.
  • The API answers a timed-out read with 504 and "This read ran past the control database's 5-minute limit and was stopped". The server log names the request and its path.
  • The run page's Statements tab shows that error in place and keeps the last list it loaded.

This is the outage half of the statement-list work; the incremental, paged read and the polling limits follow in their own PR.

No DuckShop case: this is server health and error handling, not a project shape, data value or lifecycle sequence.

Verification

  • Postgres session-limit test: a read's statement timeout leaves health untouched with no event, and a write's is still reported. The read case fails on main.
  • Health response table: a timed-out read gives 504 with no cause and nothing recorded in health.
  • Playwright: a 504 statement read shows in the Statements tab, the run page stays, and the Runs page loads in the same session.
  • cargo clippy -D warnings, fensu check, svelte-check clean; fensu dupes none.
  • Not covered by a test: the probe's own read timing out, which needs a 5-minute stall.

…s a control database outage

A statement PostgreSQL cancels at its statement limit inside a read
transaction is that read's own error: it answers 504 and is logged by
request, and is no longer kept as a cut-off session that marks the whole
control database failing. Writes, idle cut-offs and the health probe's
own read are reported as before. The run page's Statements tab shows the
error in place and keeps the last list it loaded.
@kvlonge
kvlonge enabled auto-merge November 30, 2026 15:28
@kvlonge
kvlonge added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 9206d30 Nov 30, 2026
38 checks passed
@kvlonge
kvlonge deleted the fix/read-timeout-health branch November 30, 2026 16:37
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