DBAtlas · Database operations atlas

ERR no such key: ERR no such key

Redis

What does it mean?

The key to operate on was not found in the database. Commands that require an existing key, such as RENAME, DUMP and MOVE, do not work on a nonexistent key.

Why does it happen?

The key was never created, it expired and was removed due to its TTL, a wrong key name/spelling, the wrong database (SELECT) index, or the key was already deleted with DEL.

How to fix it

Check that the key exists: EXISTS mykey. Make sure you use the correct key name and the correct database (SELECT db). RENAME requires the source key to exist. Review the logic for keys that expire via TTL. Re-create the key if needed.

Open in DBAtlas →

More from this engine