How to limit connection pool size in Node.js monk

I am using monk module to get data from mongodb. But as soon as i connect to db it creates 5 connections.

This is my mongodb command line console ...

 2015-05-14T10:32:35.618+0530 I NETWORK  [initandlisten] connection accepted from
    127.0.0.1:61015 #3 (2 connections now open)
2015-05-14T10:32:35.619+0530 I NETWORK  [initandlisten] connection accepted from
 127.0.0.1:61016 #4 (3 connections now open)
2015-05-14T10:32:35.621+0530 I NETWORK  [initandlisten] connection accepted from
 127.0.0.1:61017 #5 (4 connections now open)
2015-05-14T10:32:35.621+0530 I NETWORK  [initandlisten] connection accepted from
 127.0.0.1:61018 #6 (5 connections now open)
2015-05-14T10:32:35.622+0530 I NETWORK  [initandlisten] connection accepted from
 127.0.0.1:61019 #7 (6 connections now open)
2015-05-14T10:32:35.629+0530 I NETWORK  [conn3] end connection 127.0.0.1:61015 (
5 connections now open)
2015-05-14T10:32:35.629+0530 I NETWORK  [conn4] end connection 127.0.0.1:61016 (
5 connections now open)
2015-05-14T10:32:35.629+0530 I NETWORK  [conn5] end connection 127.0.0.1:61017 (
5 connections now open)
2015-05-14T10:32:35.629+0530 I NETWORK  [conn6] end connection 127.0.0.1:61018 (
5 connections now open)
2015-05-14T10:32:35.629+0530 I NETWORK  [conn7] end connection 127.0.0.1:61019 (
5 connections now open)

      

+3
node.js mongodb express monk


source to share


No one has answered this question yet

Check out similar questions:

2237
How do I pass command line arguments to a Node.js program?
2201
How do you decide when to use Node.js?
1648
How to exit Node.js
1517
How do I debug Node.js applications?
1388
What is the purpose of Node.js module.exports and how do you use it?
1264
How to get started with Node.js
1092
How to get GET variables (query string) in Express.js on Node.js?
890
How do I parse JSON using Node.js?
622
What are Node.js' Connect, Express and "middleware"?
0
Mongodb SocketException Handling request, closing client connection: Socket Exception 9001



All Articles
Loading...
X
Show
Funny
Dev
Pics