DBAtlas · Database operations atlas

ERR MULTI calls can not be nested: MULTI calls can not be nested

Redis

What does it mean?

MULTI was sent again while a MULTI (transaction) block was already open. Redis does not support nested transaction blocks; only one MULTI can be active at a time.

Why does it happen?

Application logic starting a new MULTI without closing the previous one with EXEC/DISCARD; reusing the same connection from a connection pool without properly resetting the transaction state; or a library wrapper unknowingly calling MULTI twice.

How to fix it

Close every MULTI block with a single EXEC (or DISCARD to cancel) and open a new block only after finishing the previous one. Clearly separate transaction start/end in the code flow. Make sure no transaction is left open before returning a connection to the pool. If nested logic is required, consider doing the atomic operation with a Lua script (EVAL).

Open in DBAtlas →

More from this engine