Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

CLIENT PAUSE

Last updated
CLIENT PAUSE timeout [WRITE | ALL]
Group
Connection
Complexity
O(1)
Arity
-3 (at least 3 words, counting the command name)
HotKV Cloud
All plans
On-Premise
no license needed

CLIENT PAUSE stops the server from running client commands for timeout milliseconds. Commands that arrive meanwhile are not refused: they wait, and run in order once the pause ends. Use it to let replicas catch up before you switch traffic to a new primary, or to freeze writes for a short maintenance step.

Option Effect
timeout Length of the pause in milliseconds. 0 is accepted.
ALL Hold every command. This is the default.
WRITE Hold only commands that may change data: write commands, plus EXEC, EVAL, EVALSHA and FCALL. Reads go on.

CLIENT UNPAUSE is never held, so you can always end a pause early. Inside a transaction only EXEC is held; the commands being queued are not.

If a pause is already active, the later end time of the two wins, and an ALL pause stays ALL even if the new one asks for WRITE.

Case Reply (RESP2 and RESP3)
Paused Simple string OK
timeout is not an integer Error ERR timeout is not an integer or out of range
timeout is negative Error ERR timeout is negative
Mode is not WRITE or ALL Error ERR CLIENT PAUSE mode must be WRITE or ALL
127.0.0.1:6379> CLIENT PAUSE 5000 WRITE
OK
127.0.0.1:6379> GET balance
"100"
127.0.0.1:6379> CLIENT UNPAUSE
OK

Same options and replies as Redis 7 and Valkey 8.

CLIENT UNPAUSE, WAIT, REPLICAOF