ruvnet/ruflo · error

Circuit breaker open - service unavailable

Error message

Circuit breaker open - service unavailable

What it means

The transport connection pool's acquire() found the circuit breaker open and the reset window (circuitBreakerResetTime since it opened) has not yet elapsed. The pool is failing fast to protect an unhealthy downstream service; requests are rejected until the breaker resets.

Source

Thrown at v3/mcp/transport/connection-pool.ts:185

    await Promise.all(destroyPromises);

    this.emit('shutdown');
  }

  /**
   * Acquire a connection from the pool
   */
  async acquire(): Promise<PooledConnection<T>> {
    const startTime = performance.now();

    // Check circuit breaker
    if (this.circuitBreakerOpen) {
      if (Date.now() - this.circuitBreakerOpenedAt > this.config.circuitBreakerResetTime) {
        // Reset circuit breaker
        this.circuitBreakerOpen = false;
        this.emit('circuitBreaker:reset');
      } else {
        throw new Error('Circuit breaker open - service unavailable');
      }
    }

    // Try to get an available connection
    for (const pooled of this.connections.values()) {
      if (pooled.state === 'available') {
        pooled.state = 'acquired';
        pooled.lastUsedAt = Date.now();
        pooled.useCount++;
        this.totalAcquisitions++;
        this.totalAcquireTime += performance.now() - startTime;
        this.emit('connection:acquired', { id: pooled.id });
        return pooled;
      }
    }

    // No available connection - try to create new one
    if (this.connections.size < this.config.maxConnections) {

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Wait for the circuit breaker cooldown before retrying.
  2. Fix the downstream service failures that opened the breaker.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at v3/mcp/transport/connection-pool.ts:185 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/916cb60b8f393389. Report an issue: GitHub.