Description
Hi! That's my first issue, so firstly I wanted to thank you folks for BullMQ!
We're using it quite a lot with @andreasasprou and this is the first problem I encountered.
After scaling up our workers, we've noticed a new error
ERR Error running script (call to f_890be59efdd64a4df5f5121df9680b166a884036): @user_script:86: user_script:86: too many results to unpack
I looked around the repository, and found unpack
in two places
Once in updateDelaySet-7.lua with a table at most 1000-elements big, and the second time in moveStalledJobsToWait-8.lua in line 86 with all jobs from KEYS[3] 'active'
.
bullmq/src/commands/moveStalledJobsToWait-8.lua
Lines 85 to 86 in 297ec30
I'm reading that calling unpack with more than 8k elements is known to crash.
- https://devforum.roblox.com/t/unpack-limit-fix/213862
- https://stackoverflow.com/questions/19202367/how-to-avoid-redis-calls-in-lua-script-limitations
I wanted to ask about limits of bullmq — should we try to scale Bull and Redis instances when dealing tens of thousands of jobs?
Or is this just a software bug, that could be solved with iteration over active
and calling unpack
with batches of 7000 (unpack(active, from_index, to_index)
)?
Activity