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


source to share





All Articles