我想使用MongoDB的與node.js的連接和下面的教程在http://howtonode.org/express-mongodbnode.js的MongoDB的收盤
代碼用於打開連接
ArticleProvider = function(host, port) {
this.db= new Db('node-mongo-blog', new Server(host, port, {auto_reconnect: true}, {}));
this.db.open(function(){});
};
但是我看不到任何連接正在關閉。 但是當我在mongo控制檯上看到日誌時,我可以看到這些連接打開並在一段時間後關閉。
連接是否自動關閉?當大量的客戶嘗試訪問服務器時會出現問題嗎?連接應該在哪裏關閉?
感謝
圖科