go-redis/redis · error

redis: failed to create pipeline connection pool: %w

Error message

redis: failed to create pipeline connection pool: %w

What it means

Error "redis: failed to create pipeline connection pool: %w" thrown in go-redis/redis.

Source

Thrown at sentinel.go:615

			// Same clamp Options.init applies to the main pool: RESP3 push
			// parsing needs a minimum read buffer, and a tiny pipeline reader
			// would break push-notification handling on pipeline conns.
			if pipelineOpt.Protocol == 3 && pipelineOpt.ReadBufferSize < proto.MinRESP3ReadBufferSize {
				pipelineOpt.ReadBufferSize = proto.MinRESP3ReadBufferSize
			}
		}
		if opt.PipelineWriteBufferSize > 0 {
			pipelineOpt.WriteBufferSize = opt.PipelineWriteBufferSize
		}
		if opt.PipelinePoolSize > 0 {
			pipelineOpt.PoolSize = opt.PipelinePoolSize
		} else {
			pipelineOpt.PoolSize = 10 // default smaller pool for pipelining
		}
		rdb.pipelinePoolName = mainPoolName + "_pipeline"
		rdb.pipelinePool, err = newConnPool(pipelineOpt, rdb.dialHook, rdb.pipelinePoolName)
		if err != nil {
			panic(fmt.Errorf("redis: failed to create pipeline connection pool: %w", err))
		}
	}

	// Register pools for OTel async gauge metrics, matching NewClient (the
	// failover client previously registered none, so pool gauges were silent
	// for the identical standalone setup). The pipeline pool is nil when not
	// configured.
	otel.RegisterPools(rdb.connPool, rdb.pubSubPool, rdb.pipelinePool, opt.Addr)

	rdb.onClose.register(onCloseHookIDSentinelFailover, failover.Close)

	failover.mu.Lock()
	failover.onFailover = func(ctx context.Context, addr string) {
		if connPool, ok := rdb.connPool.(*pool.ConnPool); ok {
			_ = connPool.Filter(func(cn *pool.Conn) bool {
				return cn.RemoteAddr().String() != addr
			})
		}

View on GitHub (pinned to 36d97525cd)

Solutions

  1. Inspect the wrapped error for why the pipeline pool failed to initialize
  2. Verify pool options and sentinel addresses

When it happens

Trigger: Thrown at sentinel.go:615 when the library encounters an invalid state.

Common situations: Fail startup on pool creation errors rather than deferring to first command.


AI-assisted analysis of go-redis/redis@36d97525cd (2026-08-06). Data as JSON: /data/errors/f8fbfd7ff99cb48f.json. Report an issue: GitHub.