{"id":"04022ffae8875500","repo":"go-redis/redis","slug":"redis-autopipeline-no-batch-permit-within-the-in","errorCode":null,"errorMessage":"redis: autopipeline: no batch permit within the internal backstop (engine overloaded or a batch is wedged)","messagePattern":"redis: autopipeline: no batch permit within the internal backstop \\(engine overloaded or a batch is wedged\\)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"autopipeline.go","lineNumber":1360,"sourceCode":"// EXPERIMENTAL: this API is subject to change, use with caution.\nvar ErrSubmitBlockingFace = errors.New(\n\t\"redis: Submit requires the deferred autopipeliner (AsyncAutoPipeline); on the blocking face use the typed methods or Do\")\n\n// errZeroAutoFuture is returned by Wait/WaitContext on a zero AutoFuture.\nvar errZeroAutoFuture = errors.New(\"redis: Wait on a zero AutoFuture\")\n\n// errDoNoArgs is returned by Do when called without a command.\nvar errDoNoArgs = errors.New(\"redis: AutoPipeliner.Do requires at least one argument\")\n\n// ErrAutoPipelineTimeout is set on drained commands when a flush could not\n// obtain a batch permit within the engine's internal backstop — the engine is\n// overloaded or an in-flight batch is wedged (e.g. read timeouts disabled on\n// a dead peer). It is deliberately NOT context.DeadlineExceeded: the caller's\n// own context did not expire, and errors.Is(err, context.DeadlineExceeded)\n// must not fire for an internal engine timeout.\n//\n// EXPERIMENTAL: this API is subject to change, use with caution.\nvar ErrAutoPipelineTimeout = errors.New(\n\t\"redis: autopipeline: no batch permit within the internal backstop (engine overloaded or a batch is wedged)\")\n\n// Submit queues a command without blocking and returns an AutoFuture; Wait on\n// it when the result is needed. This is the explicit form for working with raw\n// Cmders on the deferred (async) face, where the typed methods (Set, Get, ...)\n// provide the same deferred behaviour returning the usual *XxxCmd. The\n// command's own result accessors (Err/Val/Result) are safe to use instead of\n// Wait — they block until the command has executed. Connection-hostile\n// command names (SHUTDOWN, MONITOR, SELECT, AUTH, MULTI, SUBSCRIBE, CLIENT,\n// ...) never ride a shared pipeline connection: they are diverted to a\n// normal pooled connection with plain Client.Do semantics. On a BLOCKING\n// autopipeliner Submit is rejected (the future's Wait returns an error): the\n// blocking face's ordering relies on every caller waiting for each command\n// before issuing the next, which Submit by design does not do.\nfunc (ap *AutoPipeliner) Submit(ctx context.Context, cmd Cmder) AutoFuture {\n\tif ap.blocking {\n\t\tcmd.SetErr(ErrSubmitBlockingFace)\n\t\treturn AutoFuture{cmd: cmd, batch: completedBatch}","sourceCodeStart":1342,"sourceCodeEnd":1378,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/autopipeline.go#L1342-L1378","documentation":"Error \"redis: autopipeline: no batch permit within the internal backstop (engine overloaded or a batch is wedged)\" thrown in go-redis/redis.","triggerScenarios":"Thrown at autopipeline.go:1360 when the library encounters an invalid state.","commonSituations":"Monitor autopipeline saturation and alert before the internal backstop is hit; never retry Submit in a tight loop on this error.","solutions":["Reduce batch submission pressure (lower MaxConcurrentBatches / submission rate) so permits are released before the backstop expires","Investigate wedged batches: ensure no command blocks indefinitely (set ReadTimeout) so batch workers can complete and release permits"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}