1

我只是按照以下链接使用 grails 和 Mongo db 构建示例应用程序。

http://etcpe9.wordpress.com/2012/01/28/beginning-grails-2-0-with-mongodb/

但是每次我创建一个新人时,我都可以在 mongod shell XX connection now open 中看到以下内容。

我不确定这是否意味着连接泄漏?

Thu Feb 21 21:04:06 [initandlisten] connection accepted from 127.0.0.1:50526 #22
 (1 connection now open)
Thu Feb 21 21:04:27 [initandlisten] connection accepted from 127.0.0.1:50527 #23
 (2 connections now open)
Thu Feb 21 21:04:27 [initandlisten] connection accepted from 127.0.0.1:50528 #24
 (3 connections now open)
Thu Feb 21 21:04:36 [initandlisten] connection accepted from 127.0.0.1:50531 #25
 (4 connections now open)
Thu Feb 21 21:04:36 [initandlisten] connection accepted from 127.0.0.1:50532 #26
 (5 connections now open)
Thu Feb 21 21:04:48 [initandlisten] connection accepted from 127.0.0.1:50533 #27
 (6 connections now open)
Thu Feb 21 21:04:53 [initandlisten] connection accepted from 127.0.0.1:50534 #28
 (7 connections now open)
Thu Feb 21 21:04:59 [initandlisten] connection accepted from 127.0.0.1:50535 #29
 (8 connections now open)
Thu Feb 21 21:05:04 [initandlisten] connection accepted from 127.0.0.1:50536 #30
 (9 connections now open)
Thu Feb 21 21:05:10 [initandlisten] connection accepted from 127.0.0.1:50537 #31
 (10 connections now open)
4

1 回答 1

3

不,这是维护连接池的 mongodb 驱动程序,因此它可以重用连接。

于 2013-02-21T16:11:39.870 回答