开发者

When does MongoDB close persistent DB connections?

开发者 https://www.devze.com 2023-01-05 21:31 出处:网络
I ran a few开发者_运维知识库 queries w/ the persistent option turned on. I now have a maximum of 8 connections opened (view from the HTTP interface); I was wondering if they\'ll ever close. Does it hu

I ran a few开发者_运维知识库 queries w/ the persistent option turned on. I now have a maximum of 8 connections opened (view from the HTTP interface); I was wondering if they'll ever close. Does it hurt to leave all 8 open?


No, it shouldn't hurt to leave them open. It depends on what application server you're using, but they'll usually be closed after a few requests. MongoDB accepts up to 20,000 connections.

0

精彩评论

暂无评论...
验证码 换一张
取 消