Comments (5)
I'm getting the same error. I believe I have traced it to RedisConnection.waitUntilReady()
:
bullmq/src/classes/redis-connection.ts
Lines 41 to 50 in b96f5ba
I am providing the queue with a connected and ready connection. As such, the scripts are never loaded as handleReady()
(and thus load
) is never executed. I'm imagining what is required is some way of determining whether the scripts are loaded, and if not, load them before resolving the Promise.
The only two workarounds I have discovered so far are using a fresh Redis connection for every queue, or I will need to manually call load
on the connection before passing it on. Not a major hassle, but possibly unexpected behavior nonetheless.
Edit: perhaps superfluously, a snippet of how I worked around this issue:
import IORedis from 'ioredis'
import { load, Queue } from 'bullmq'
const connection = new IORedis()
connection.once('ready', async () => {
await load(connection)
const queue = new Queue('name', { connection })
// ...
})
Edit 2: Possibly related to #108 as well
Edit 3: I just noticed #59
from bullmq.
try with this change:
export async function addToQueue(queueName: string, data: any): void {
await queues[queueName].waitUntilReady();
return queues[queueName].add(queueName, data);
}
from bullmq.
I will leave this open because waitUntilReady
should not be necessary, we overlooked it.
from bullmq.
I got jammed up by this issue, my implementation has a generator
that fans out my tasks. Worked fine locally. But my deployment has a limit on redis-connections which blew up my worker. I figured I'd just share the redis connection which is when I started having error. The solution on issue #59 helped get me over the bump. Just an FYI to anyone else that lands here.
from bullmq.
🎉 This issue has been resolved in version 1.8.13 🎉
The release is available on:
Your semantic-release bot 📦🚀
from bullmq.
Related Issues (20)
- [Bug]: workers stopped consuming job, sometime event loss HOT 5
- Python: Add basic logging, remove print statements, ... HOT 1
- Support sandboxed processors in Next.js HOT 1
- Is it possible to share a job between different flows ? HOT 1
- [Bug]: job stuck in active state after worker process termination HOT 1
- [Bug]: Error from worker on delayed jobs HOT 7
- [Bug]: Flows use different rules for hash prefixes on distinct queues
- Is there a way to just add timestamps on job log entries ?
- [Bug]: opitmize compute repeatJobKey
- I want to remove a running job with a specific JobId, how does it work? HOT 2
- [Docs]: Minor wrong information in docs HOT 1
- Sandboxed processors automatically close the Node window HOT 2
- [Bug]: Logs are not properly emitted to the console. HOT 4
- [Bug]: Bull is processing two jobs simultaneously even with concurrency equals to 1 HOT 6
- [Bug]: increasing memory when using workerthreads
- Repeatable Jobs - Ability to Upsert/Remove Job via Job ID Alone HOT 2
- addJob from serverless environment HOT 1
- Add event after job exhausted attempts HOT 5
- [Bug]: Is it normal to get lots of "Command timed out" from bzpopmin? HOT 1
- [Bug]: removeOnComplete fails when set on worker HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bullmq.