{"record":{"id":"916cb60b8f393389","repo":"ruvnet/ruflo","slug":"circuit-breaker-open-service-unavailable","errorCode":null,"errorMessage":"Circuit breaker open - service unavailable","messagePattern":"Circuit breaker open - service unavailable","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/mcp/transport/connection-pool.ts","lineNumber":185,"sourceCode":"    await Promise.all(destroyPromises);\n\n    this.emit('shutdown');\n  }\n\n  /**\n   * Acquire a connection from the pool\n   */\n  async acquire(): Promise<PooledConnection<T>> {\n    const startTime = performance.now();\n\n    // Check circuit breaker\n    if (this.circuitBreakerOpen) {\n      if (Date.now() - this.circuitBreakerOpenedAt > this.config.circuitBreakerResetTime) {\n        // Reset circuit breaker\n        this.circuitBreakerOpen = false;\n        this.emit('circuitBreaker:reset');\n      } else {\n        throw new Error('Circuit breaker open - service unavailable');\n      }\n    }\n\n    // Try to get an available connection\n    for (const pooled of this.connections.values()) {\n      if (pooled.state === 'available') {\n        pooled.state = 'acquired';\n        pooled.lastUsedAt = Date.now();\n        pooled.useCount++;\n        this.totalAcquisitions++;\n        this.totalAcquireTime += performance.now() - startTime;\n        this.emit('connection:acquired', { id: pooled.id });\n        return pooled;\n      }\n    }\n\n    // No available connection - try to create new one\n    if (this.connections.size < this.config.maxConnections) {","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/mcp/transport/connection-pool.ts#L167-L203","documentation":"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.","triggerScenarios":"Thrown at v3/mcp/transport/connection-pool.ts:185 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait for the circuit breaker cooldown before retrying.","Fix the downstream service failures that opened the breaker."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}