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
bee-queue will not wait for redis re-connection and fails with error #147
Comments
I thought ioredis will improve something, but both bee-queue: 1.x and bee-queue 2.0dev behave the same on redis stop, here is from 2.0dev:
After redis start:
|
i'm seeing the same problem i.e. after a redis restart, i get
|
i think you need to code such logic your self |
I'm getting similar errors. During transit, if i end a |
We are having the same problem, if the redis connection is lost for some seconds, bee-queue is not able to create jobs anymore, any ideas how to handle this? |
@Tob0t deploy a redis cluster |
This is a less than helpful response @frank-dspeed. We're asking for clarity on how to handle disconnects from between redis & bee-queue. Not mitigate by supplying more endpoints for bee-queue to connect to.
|
Thanks @DanielTamkin I solved it now by catching the error on create job and then reloading the scripts as suggested by @skeggse (#119 (comment)). It's maybe not working for every use case but it fits for ours. import bqScripts from 'bee-queue/lib/lua';
queue.createJob(config)
.save(async (err, job) => {
if (err) {
console.error(`failed creating job ${id}`);
// Known error when redis has not all lua scripts loaded properly
if (err.command === 'EVALSHA') {
await bqScripts.buildCache(redisClient);
console.info('Successfully reloaded Lua scripts into cache!');
// create job again
queue.createJob(config).save();
}
}
}); |
@skeggse any reason not to catch |
From my point of view this issue is quite significant, I've stumbled upon this after only a few hours of testing. For production use, resilience to transient outages is paramount. The recommendation by Redis is exactly @shils suggestion: Optimistically perform an #316 looks promising in this regard. Preloading scripts as triggered by |
Testing bee-queue for a busy application. After connection with redis-server is lost, bee-queue will not wait for re-connection, but will fail. Sure, re-connection is a task of a redis-client, but seems that bee can't process it correctly when client reports disconnection. I'm surprised, is that as per design or a bug? I didn't find any setting for re-connection attempts or/and interval for that.
The text was updated successfully, but these errors were encountered: