When does MongoDB close persistent DB connections?
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.
精彩评论