Documentation / @etherfold/browser / HostRestartOptions
Type Alias: HostRestartOptions ​
HostRestartOptions =
object
Defined in: packages/browser/src/host/restart.ts:184
WHAT THE PORT DOES ABOUT A HOST THAT DIED.
Properties ​
attempts? ​
readonlyoptionalattempts?:number
Defined in: packages/browser/src/host/restart.ts:194
How many restarts in a row before the port gives up. Defaults to five.
Bounded because a restart is its own hazard: a worker that dies on boot, restarted without a budget, is a hot loop building workers for ever, and the app is never told anything has gone wrong. 0 never restarts, which leaves the death REPORTED and the calls rejected -- the other three parts of the decision are not the restart.
backoffInSeconds? ​
readonlyoptionalbackoffInSeconds?:number
Defined in: packages/browser/src/host/restart.ts:203
How long the port waits before the FIRST restart, in seconds. It DOUBLES per consecutive death, up to maxBackoffInSeconds. Defaults to half a second.
Not zero, and not a fixed interval: a worker killed by memory pressure that is rebuilt instantly meets the same pressure, and a fixed interval turns "it keeps dying" into a steady drum of new workers.
maxBackoffInSeconds? ​
readonlyoptionalmaxBackoffInSeconds?:number
Defined in: packages/browser/src/host/restart.ts:205
The ceiling that doubling stops at. Defaults to thirty seconds.
settledAfterInSeconds? ​
readonlyoptionalsettledAfterInSeconds?:number
Defined in: packages/browser/src/host/restart.ts:214
How long a host must stay alive before the consecutive-death count is FORGOTTEN. Defaults to a minute.
It is what makes the budget a budget for a CRASH LOOP rather than a lifetime quota: a tab open all day, whose worker was evicted twice hours apart, has not spent anything.