ERR wrong number of arguments / syntax error Redis Origin: Data OSI layer 7 · Application Last updated 5 Nov 2026

Redis: (error) ERR wrong number of arguments for 'set' command / ERR syntax error

The command was malformed: missing/extra arguments or an unsupported option for your Redis version.

Exact message you may see ERR wrong number of arguments for 'set' command(error) ERR syntax errorReplyError: ERR wrong number of arguments for 'hset' commandERR unknown commandERR Unknown subcommand or wrong number of arguments for 'x'
Seen on: Redis Node.js

Meaning

Check the command's syntax with COMMAND DOCS set (Redis 7) or the docs. Client libraries may build commands incorrectly when a value is undefined (skipped) or when options (EX, NX, GT) aren't supported by the server version (e.g. SET ... GET needs 6.2, GT/LT for EXPIRE 7.0).

Common causes

  • Missing argument (undefined variable skipped)
  • Option not supported by old server
  • Wrong order of options
  • Spaces unquoted in redis-cli
  • Client/server version mismatch

⚡ Quick fix

  1. Run the command manually in redis-cli
  2. Check INFO server version vs the command's "since" version
  3. Quote values with spaces

Detailed fix by platform

Linux

  1. redis-cli COMMAND DOCS set | head; redis-cli INFO server | grep redis_version

How to diagnose

  1. Command — Syntax per docs?
  2. Version — Supported?
  3. Args — All present?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

BullMQ: Missing lock for job / job stalled more than allowable limit — BullMQ: Error: Missing lock for job 42. moveToFinished / job stalled more than allowable limit (Redis)BullMQ: Missing lock …BUSY Redis is busy running a script — Redis: (error) BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE (Redis)BUSY Redis is busy ru…Celery with Redis: tasks run twice (visibility_timeout) — Celery: Task executed twice / Restoring unacked messages — Redis broker visibility_timeout shorter than task ETA (Redis)Celery with Redis: ta…Client output buffer limit reached (scheduled to be closed) — Redis: Client id=12 addr=10.0.0.5:51234 scheduled to be closed ASAP for overcoming of output buffer limits (Redis)Client output buffer …ERR DB index is out of range — Redis: (error) ERR DB index is out of range / ERR SELECT is not allowed in cluster mode (Redis)ERR DB index is out o…ERR unknown command — Redis: (error) ERR unknown command 'JSON.GET', with args beginning with: / unknown command 'FT.SEARCH' (Redis)ERR unknown commandERR value is not an integer or out of range — Redis: (error) ERR value is not an integer or out of range (Redis)ERR value is not an i…EXECABORT Transaction discarded because of previous errors — Redis: (error) EXECABORT Transaction discarded because of previous errors. (Redis)EXECABORT Transaction…ERR wrong…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.