我已经使用 spring 实现了一个应用程序,在调查 mongodb 日志时,我发现连接仅在一周内增加而不是释放
Tue Jul 23 11:26:04 [initandlisten] connection accepted from 127.0.0.1:38772 #92 (83 connections now open)
Tue Jul 23 11:27:59 [initandlisten] connection accepted from 127.0.0.1:38789 #93 (84 connections now open)
Tue Jul 23 11:28:44 [initandlisten] connection accepted from 127.0.0.1:38794 #94 (85 connections now open)
Tue Jul 23 11:29:08 [initandlisten] connection accepted from 127.0.0.1:38802 #95 (86 connections now open)
Wed Jul 24 05:46:09 [initandlisten] connection accepted from 127.0.0.1:39045 #96 (87 connections now open)
Wed Jul 24 05:46:32 [initandlisten] connection accepted from 127.0.0.1:39048 #97 (88 connections now open)
Wed Jul 24 05:47:14 [initandlisten] connection accepted from 127.0.0.1:39054 #98 (89 connections now open)
Wed Jul 24 05:48:44 [initandlisten] connection accepted from 127.0.0.1:39057 #99 (90 connections now open)
Wed Jul 24 11:41:50 [initandlisten] connection accepted from 127.0.0.1:39146 #100 (91 connections now open)
我不希望 mongodb 达到 maxConnection 限制并卡住一天,我该如何处理这种情况?
MongoDB版本:2.2
此致
谢谢