Creating too much physical connections when requesting a virtual connection

60 views
Skip to first unread message

Kaizah Kaiser

unread,
Aug 2, 2016, 9:44:22 AM8/2/16
to ReactiveMongo - http://reactivemongo.org
I am using reactive mongo 0.11.14 for Play 2.3 and am creating a connection to my localhost MongoDB server. When I do so, I initially get the 10 physical connections that should be opened, but roughly 10 seconds later, there are _always_ (without exception) 9 more created.

I am running these commands:
val driver = new MongoDriver()
val conn
= driver.connection
val conn
= driver.connection(List("localhost"))

And I am seeing this in the mongo daemon:
2016-08-02T15:34:41.910+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62602 #77 (1 connection now open)
2016-08-02T15:34:42.173+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62603 #78 (2 connections now open)
2016-08-02T15:34:42.175+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62604 #79 (3 connections now open)
2016-08-02T15:34:42.177+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62605 #80 (4 connections now open)
2016-08-02T15:34:42.178+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62606 #81 (5 connections now open)
2016-08-02T15:34:42.179+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62607 #82 (6 connections now open)
2016-08-02T15:34:42.180+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62608 #83 (7 connections now open)
2016-08-02T15:34:42.181+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62609 #84 (8 connections now open)
2016-08-02T15:34:42.182+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62610 #85 (9 connections now open)
2016-08-02T15:34:42.184+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62611 #86 (10 connections now open)
2016-08-02T15:34:51.827+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62613 #87 (11 connections now open)
2016-08-02T15:34:51.830+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62614 #88 (12 connections now open)
2016-08-02T15:34:51.845+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62615 #89 (13 connections now open)
2016-08-02T15:34:51.847+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62616 #90 (14 connections now open)
2016-08-02T15:34:51.849+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62617 #91 (15 connections now open)
2016-08-02T15:34:51.850+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62618 #92 (16 connections now open)
2016-08-02T15:34:51.852+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62619 #93 (17 connections now open)
2016-08-02T15:34:51.855+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62620 #94 (18 connections now open)
2016-08-02T15:34:51.859+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62621 #95 (18 connections now open)
2016-08-02T15:35:01.813+0200 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:62623 #96 (19 connections now open)

Also, running the mongo client and querying for the number of connections show 19 (20 if you include the mongo client too):
G> db.serverStatus().connections
{ "current" : 20, "available" : 999980, "totalCreated" : NumberLong(97) }



Why are these 9 additional connections created?

Cédric Chantepie

unread,
Aug 2, 2016, 10:56:48 AM8/2/16
to ReactiveMongo - http://reactivemongo.org
Hi,

This issue (#527) has been fixed since. You can try the version 0.12-RC1.

Best regards
Reply all
Reply to author
Forward
0 new messages