-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.0.4
-
Component/s: None
-
Labels:
-
Environment:Linux with connecting to Docker image.
-
Empty show more show less
Even just connecting to MongoDB server from node client seems to have traffic on the connection every 5 seconds, even when there are no queries being issues by the client. Why is this? Is this really necessary? I am investigating using MongoDB in the resource constrained environment and I was surprised about this. Is there a way to disable this?
Reproduction. Using the following script:
const MongoClient = require('mongodb').MongoClient; const url = 'mongodb://localhost:27017'; const dbName = 'app'; const mongoClientPromise = MongoClient.connect(url);
Running MongoDB inside Docker:
docker run -d --rm -p 27017:27017 --name mongo mongo:3.6.3 --replSet app
Running the above script:
node test.js