Too many open Redis Connections while using BullMQ #2557
-
I am using Redis BullMQ (V5) to implement a Message Queue system to create a Queue for each visitor of our application and process their messages through this Queue so that one visitor doesn't have to wait for other visitors' messages to be processed; and we are using Redis Labs. I am passing Redis Host, Port details to instantiate a queue. It is observed that the Redis connections created by a queue are not closed after the queue is closed or even obliterated, which is causing spikes in the Redis. Can you suggest how we could close the connections after the queue is done with its jobs? Here's a snippet of my implementation:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
@VinuthnaGangula The connections are closed when you call the queue.close() or worker.close() method, I wonder if you have a more concrete example when this is not the case. |
Beta Was this translation helpful? Give feedback.
Yes, you can try to reuse and manually close unused workers, but I think that as the number of customers increase this will be quite difficult to maintain, thats why I recommended you the groups functionality which matches perfectly with your requirements.