.NET best practices for MongoDB connections?

前端 未结 6 932
臣服心动
臣服心动 2020-12-12 14:40

I\'ve been playing with MongoDB recently (It\'s AMAZINGLY FAST) using the C# driver on GitHub. Everything is working just fine in my little single threaded console app that

6条回答
  •  粉色の甜心
    2020-12-12 14:58

    I am using csharp-mongodb driver and it doesn't help me with his connection pool :( I have about 10-20 request to mongodb per web request.(150 users online - average) And i can't even monitor statistics or connect to mongodb from shell it throw exception to me.

    I have created repository, which open and dispose connection per request. I rely on such things as: 1) Driver has connection pool 2) After my research(i have posted some question in user groups about this) - i understood that creating mongo object and open connection doesn't heavy operation, so heavy operation.

    But today my production go down :( May be i have to save open connection per request...

    here is link to user group http://groups.google.com/group/mongodb-user/browse_thread/thread/3d4a4e6c5eb48be3#

提交回复
热议问题