admin

Flush Wal

Spawn a checkpoint subprocess to merge the WAL into the main DB file.

Why a subprocess instead of con.execute("FORCE CHECKPOINT") in-process: on the production 13 GB DuckDB file the in-process call hung for 20+ minutes at the first attempt during ingestion (verified 2026-04-30) — FastAPI's _db_conn keeps fielding admin polls, FORCE CHECKPOINT waits to abort those transactions, and the wait never resolves. The subprocess pattern (used by the periodic CHECKPOINT cron, the post-ingestion CHECKPOINT, and the mid-ingestion CHECKPOINT) bypasses this by running in a separate process: it acquires the DuckDB file- level writer lock cleanly and core.get_db() returns clean 503s (via /data/archive.lock presence) for the duration.

Returns immediately. The subprocess removes /data/archive.lock when finished. Watch Railway logs for "Manual CHECKPOINT subprocess spawned" and a few minutes later "Removed archive lock file".

post/api/admin/flush-wal

Request

  • Base URL: https://www.awardflightdaily.com (the document declares no server; this is the origin it was published from)
  • URL: https://www.awardflightdaily.com/api/admin/flush-wal
  • Auth: none declared

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.