【问题标题】:Is there a connection leak while using Grails with Mongo DB将 Grails 与 Mongo DB 一起使用时是否存在连接泄漏
【发布时间】:2013-02-21 15:49:10
【问题描述】:

我刚刚按照以下链接使用 grails 和 Mongo db 构建了一个示例应用程序。

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

但是每次我创建一个新人时,我都可以在 mongod shell 中看到以下内容 XX 连接现已打开。

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

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)

【问题讨论】:

    标签: mongodb grails


    【解决方案1】:

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

    【讨论】:

    • 不错,连接几次后就停止增长了。
    猜你喜欢
    • 2013-11-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多