redis/node-redis · error · Error

Timeout waiting for action ${actionId}

Error message

Timeout waiting for action ${actionId}

What it means

waitForAction loops until Date.now() - startTime exceeds maxWaitTimeMs (default 60000ms). If the action never reaches 'failed', 'finished', or 'success' within the window, it throws. Note the 'failed' check runs first, so this error specifically means the action stayed pending/running the whole time.

Source

Thrown at packages/test-utils/lib/fault-injector/fault-injector-client.ts:130

    while (Date.now() - startTime < maxWaitTime) {
      const action = await this.getActionStatus<ActionStatus>(actionId);

      if (action.status === "failed") {
        throw new Error(
          `Action id: ${actionId} failed! Error: ${action.error}`
        );
      }

      if (["finished", "success"].includes(action.status)) {
        dbg(`${actionId} completed: ${action.status}`)
        return action;
      }

      await setTimeout(timeout);
    }

    throw new Error(`Timeout waiting for action ${actionId}`);
  }

  async migrateAndBindAction({
    bdbId,
    clusterIndex,
  }: {
    bdbId?: string | number;
    clusterIndex: string | number;
  }) {
    const resolvedBdbId = this.#resolveBdbId(bdbId);
    dbg('migrateAndBind: bdb', resolvedBdbId, 'cluster', clusterIndex);
    const clusterIndexStr = clusterIndex.toString();

    return this.triggerAction<{
      action_id: string;
    }>({
      type: "sequence_of_actions",
      parameters: {

View on GitHub (pinned to 90fd0652bc)

Solutions

  1. Increase the budget: triggerAction(action, { maxWaitTimeMs: 180_000 })
  2. Call getActionStatus(actionId) after the timeout to see whether it eventually completes
  3. Check fault-injector service health/logs for a stuck queue or hung worker

Example fix

// before — 60s default budget exceeded
await fi.triggerAction(action);

// after — allow 3 minutes
await fi.triggerAction(action, { maxWaitTimeMs: 180_000, timeoutMs: 2_000 });
Defensive patterns

Strategy: retry

Try / catch

try {
  await fi.triggerAction(action, { maxWaitTimeMs: 180_000 });
} catch (e) {
  if (e instanceof Error && /Timeout waiting for action/.test(e.message)) {
    const status = await fi.getActionStatus(actionId);
  }
  throw e;
}

Prevention

When it happens

Trigger: triggerAction(...) where the backend accepts the action but never completes it: stuck queue, backend hang, a long-running operation exceeding 60s, or network stalls that make status polling return the same non-terminal state.

Common situations: Large migration on a slow cluster; backend overloaded; action genuinely takes longer than the default budget; polling degraded by intermittent fetch failures returning stale status.

Understand the failure class

Related errors


AI-assisted analysis of redis/node-redis@90fd0652bc (2026-08-11). Data as JSON: /api/errors/35304a0c94615cfc. Report an issue: GitHub.