moleculerjs / moleculer-db

:battery: Database access service mixins for Moleculer
https://moleculer.services/
MIT License
152 stars 121 forks source link

Way too many MongoDB connections opened #266

Open manjufy opened 3 years ago

manjufy commented 3 years ago

Hi, Have been using Molecular with MongoDB adapter, and MongoDB connection handling is very similar to

what's in the examples https://github.com/moleculerjs/moleculer-examples/blob/master/conduit/mixins/db.mixin.js#L15

The concern is that molecular services open up way too many mongo connections and max our the RAM freezing the server for further processing any requests.

Here is a glimpse of the server processes

Screenshot 2021-06-09 at 9 07 23 AM

Is there a way to reduce the number of connections by reusing them instead?

0x0a0d commented 3 years ago

module mongodb does not spawn mongod process