redis.conf to CONFIG SET

Paste a redis.conf and get the CONFIG SET commands that apply it live. Directives that need a restart are commented out with the reason, because CONFIG SET on a read-only parameter is an error rather than a no-op.

Paste below, or drop a file anywhere on this panel

Or drop a file anywhere on this panel. Nothing is uploaded: the analysis runs in this tab.

The answer appears here

Paste on the left and press Convert. Nothing leaves this tab.

Examples

Real input you can load into the tool above. Each one shows a different thing going wrong, because that is what the tool is for.

Live and restart-only

Which directives can be applied now, and which are commented out because they cannot

maxmemory 2gb
maxmemory-policy allkeys-lru
port 6380

Common mistakes

These are the ones that fail silently. The config is accepted, nothing raises an error, and the consequence arrives later.

  1. Applying a fix with CONFIG SET and stopping there

    It changes memory only. The next restart, for any reason, reverts it. The classic version is a limit raised during an incident and undone weeks later by an unrelated deploy.

    Instead:Follow with CONFIG REWRITE, or make the same edit in the file.

  2. Running CONFIG SET appendonly yes at peak

    It starts an AOF rewrite immediately, which forks the process. On a large dataset that is a memory spike and a latency event.

    Instead:Do it during a quiet period, and watch used_memory_rss while it runs.

CONFIG SET changes memory, not the file

This is the detail that turns a good fix into a future incident, and it catches experienced people because nothing about the command suggests it.

Nothing you set survives a restart

CONFIG SET changes the running server only. The file is untouched, so the next restart, whenever and for whatever reason it happens, reverts everything. The classic version of this is a memory limit raised during an incident at 3am and undone weeks later by an unrelated deploy, with nobody connecting the two.

CONFIG REWRITE is the other half

It writes the running configuration back to the config file, preserving comments and structure. It requires that Redis was started with a config file: an instance started with command line arguments only has nowhere to write, and the command errors.

Some directives genuinely need a restart

port, bind, databases, cluster-enabled, io-threads and appendfilename are fixed at startup. CONFIG SET on those returns an error naming the parameter rather than accepting and ignoring it, so nothing fails silently, but a script that assumes success will do the wrong thing.

appendonly is settable, and it does real work

CONFIG SET appendonly yes starts an AOF rewrite immediately, which forks the process. On a large dataset that is a memory spike and a latency event, so it is not a change to make casually during peak traffic.

What this cannot see

Whether your server accepts a given parameter depends on its version, and directives are renamed between versions: hash-max-ziplist-entries became hash-max-listpack-entries in 7.0, with the old name kept as an alias. This page does not know your version, so it cannot tell you which spelling yours wants.