Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent lua error "user_script:28: attempt to compare number with nil" #438

Closed
rbalaine opened this issue Mar 23, 2021 · 2 comments
Closed

Comments

@rbalaine
Copy link

rbalaine commented Mar 23, 2021

Hello!
I'm currently migrating from bull to bullmq and I can see the following lua script error in my logs:

ReplyError: ERR Error running script (call to f_2aabbf31d90ee84a7e1b78cd1cf562abca6174b3): @user_script:28: user_script:28: attempt to compare number with nil  stack="ReplyError: ERR Error running script (call to f_2aabbf31d90ee84a7e1b78cd1cf562abca6174b3): @user_script:28: user_script:28: attempt to compare number with nil
    at parseError (/queue/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/queue/node_modules/redis-parser/lib/parser.js:302:14)"

This is happening after successfully running a job. Sometimes directly after job completion, sometimes a few minutes later. Most of the time this error appears 2 times.
It doesn't seem to have any impact. The job is moved to completed status, emit the associated event and finally removed (thanks to { removeOnComplete: true } option).
There is no other job waiting to be processed after.

I've tried to identify the affected LUA script without success.

Some other information:

  • We have several Worker instance per queue, one for each different job processor
  • We share a Redis connection instance between Queue and Workers. I've tried to use a new instance for each Worker, it doesn't change anything
  • We also have a QueueScheduler and a QueueEvents instance per Queue.

Have you ever experienced that issue? Do you have any idea of which command could cause that? Maybe moveToFinished-7.lua?

@rbalaine
Copy link
Author

Never mind, I just found an issue in my code. Queue.clean method signature have change between bull and bullmq, limit and type parameters are inverted 😅

@manast
Copy link
Contributor

manast commented Mar 25, 2021

I heavily recommend to use typescript only to avoid all these problems and for many more benefits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants