i got error when i queue with bull library in node js, the error is like this :
Error: read ECONNRESET at TCP.onStreamRead
- - errno: -104,
- - code: 'ECONNRESET',
- - syscall: 'read'
- - }
and
MaxRetriesPerRequestError: Reached the max retries per request limit (which is 20). Refer to "maxRetriesPerRequest" option for details.
this my code :
const imageQueue = new Bull("imageQueue", process.env.REDIS_URL);
2
Answers
error solved successfully by adding tls
bull uses ioredis to connect, and allows a third opts parameter in the Queue constructor. According to the source code it looks for a redis property within those opts.
You might try this to raise the retry limit to 100.
But, also, you may be using Heroku’s redis service more intensively than they allow for the free tier (if that’s what you use).