Skip to content

RivetKit action can hit closed SQLite coordinator immediately after local engine restart #5554

Description

@stumptowndoug

Description

With RivetKit 2.3.10 and the bundled rivet-engine 2.3.10, an actor action invoked immediately after restarting the local engine/registry failed once with SQLite transaction coordinator is closed. Retrying the same action after a short delay succeeded. The engine log suggested this happened while the actor generation was syncing.

Environment

  • RivetKit: 2.3.10
  • rivet-engine: 2.3.10 from @rivetkit/engine-cli
  • Runtime: Bun 1.3.14
  • Platform: macOS arm64
  • Actor database: embedded SQLite via rivetkit/db/drizzle

Reproduction sequence

  1. Start a local registry with registry.start() and let RivetKit spawn/reuse the local engine.
  2. Create an actor and call an action that reads its embedded SQLite database.
  3. Stop the Bun registry process and restart the local engine/registry.
  4. Immediately call the same actor action from a separate client process.
  5. The first call can fail with SQLite transaction coordinator is closed; a short delayed retry succeeds.

I have only observed this once so far, so the timing window is transient rather than a deterministic reproduction.

Workaround

A client-side retry limited to this exact error, with short bounded backoff (100/250/500 ms), handles the observed failure.

Is this a known actor-generation synchronization race, and is there a readiness signal or more specific structured error code clients should use instead of matching the message?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions