0

When this question has been asked before (How to fix the "Redis is busy running a script" error), the solution is to make the client retry requests until it succeeds.

I was wondering if, specifically, it is possible to fix the issue on the server side instead. Redis only replies "Busy" when a script is running, but not on any other commands. If Redis is in the middle of a script, can you tell Redis to make a client wait until it is able to execute the next command, rather than return the BUSY error to that request?

sffc
  • 382
  • 1
  • 3
  • 11

1 Answers1

0

Redis is single-threaded.

Redis is, mostly, a single-threaded server from the POV of commands execution (actually modern versions of Redis use threads for different things). It is not designed to benefit from multiple CPU cores. People are supposed to launch several Redis instances to scale out on several cores if needed. It is not really fair to compare one single Redis instance to a multi-threaded data store.

Since it's single threaded it's will be ended with above errors is jobs are queued.

You can try https://github.com/JohnSully/KeyDB

If you are interested in hack please refer https://stackoverflow.com/questions/51929278/make-redis-client-wait-when-server-is-running-a-long-lua-script

asktyagi
  • 2,401
  • 1
  • 5
  • 19