BullMQ and postgres connection (knex)

456 Views Asked by At

I have a worker running that make call to a Postgres database.

Even though I'm initializing the connection to the database outside of the worker (with knex in a singleton), the number of connection are going to the roof when there is a lot of activity (up to 20 instead of 2 : One for my main app and one for the worker).

How can I reuse the same connection ?

0

There are 0 best solutions below