Skip to content

Commit 3350cdc

Browse files
committed
fix(rivetkit): reduce pegboard actor retry for spawned engines
1 parent 8f9ad21 commit 3350cdc

File tree

1 file changed

+12
-0
lines changed
  • rivetkit-typescript/packages/rivetkit/src/engine-process

1 file changed

+12
-0
lines changed

rivetkit-typescript/packages/rivetkit/src/engine-process/mod.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,18 @@ export async function ensureEngineProcess(
8585
stdio: ["inherit", "pipe", "pipe"],
8686
env: {
8787
...process.env,
88+
// In development, runners can be terminated without a graceful
89+
// shutdown (i.e. SIGKILL instead of SIGTERM). This is treated as a
90+
// crash by Rivet Engine in production and implements a backoff for
91+
// rescheduling actors in case of a crash loop.
92+
//
93+
// This is problematic in development since this will cause actors
94+
// to become unresponsive if frequently killing your dev server.
95+
//
96+
// We reduce the timeouts for resetting a runner as healthy in
97+
// order to account for this.
98+
RIVET__PEGBOARD__RETRY_RESET_DURATION: "100",
99+
RIVET__PEGBOARD__BASE_RETRY_TIMEOUT: "100",
88100
},
89101
});
90102

0 commit comments

Comments
 (0)