CONFIG
Reads or changes runtime configuration and resets command statistics.
Server & administration · Example verified
Syntax covered here
CONFIG GET parameter | CONFIG SET parameter value | CONFIG RESETSTATGET and SET are verified for maxclients, including restoring its original value. RESETSTAT clears command counters according to the architecture, without changing stored data.
Tested example & replies
Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.
# connection: default
> CONFIG GET maxclients
["maxclients","10000"]
# connection: default
> CONFIG SET maxclients 9999
"OK"
# connection: default
> CONFIG GET maxclients
["maxclients","9999"]
# connection: default
> CONFIG SET maxclients 10000
"OK"
# connection: default
> CONFIG RESETSTAT
"OK"