steineey / node-red-contrib-mongodb4

MongoDB driver node for Node-RED
MIT License
26 stars 10 forks source link

On rednode deploy connection created but old not terminated #14

Closed hubient closed 1 year ago

hubient commented 1 year ago

Hi i use this node now since a short time. And I was wondering why I had more and more sessions on the mongodb. I could find the Issue must be on the connection on this node. When a deployment of a changed flow happens the old / current connections get's not terminated and a new connecton pool is generated. I could not find a way to stop from this behavior except complete restart of red-node. I use actual rednode 2.1.3.

steineey commented 1 year ago

Hi hubient, which version of node-red-contrib-mongodb4 do you use? This issue should be fixed in the latest release v1.8.1. In theory every configuration node creates a MongoClient instance with it's own connection pool. On configuration node close. On flow redeployment the client should be closed.

hubient commented 1 year ago

Hi steineey

Thanks for the reply, I have 1.8.0 installed. And there seems no 1.8.1 version available. Nodejs is in the version v14.18.1.

Am 18.11.2022 um 21:51 schrieb steineey:

Hi hubient, which version of node-red-contrib-mongodb4 do you use? This issue should be fixed in the latest release v1.8.1. In theory every configuration node creates a MongoClient instance with it's own connection pool. On configuration node close. On flow redeployment the client should be closed.

— Reply to this email directly, view it on GitHub https://github.com/steineey/node-red-contrib-mongodb4/issues/14#issuecomment-1320509920, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQMQSPIG5XYNO6ZS7MUBU4LWI7T4HANCNFSM6AAAAAASEYIUXA. You are receiving this because you authored the thread.Message ID: @.***>

steineey commented 1 year ago

Check out NPM for version 1.8.1 here Go to your node-red directory and npm install --save node-red-contrib-mongodb4@1.8.1.