[CSHARP-2636] MongoDB operation suddenly slow down for an undefined period of time Created: 12/Jun/19 Updated: 25/Jun/20 Resolved: 25/Jun/20 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | API |
| Affects Version/s: | 2.7.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Christian Hubert | Assignee: | Wan Bachtiar |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows Server 2012 R2 |
||
| Description |
|
Hi, First of all I'm not sure it is a bug and the main point of this post is to find anything that could lead to a more complete diagnostic about the issue: 'Sometimes' (randomly) our server application operations are seriously slowed down, up to 20x slower than they usually are. This occurs about 3 or 4 times per week but leads to stop the production our application is involved in. This problem appeared 3 weeks ago. It generally occurs for about 10 minutes to nearly an hour. We first suspected other reasons (than MongoDB), such as .net WCF client/server communications, but as the problem is really global, including batch operations (such as data files integrations) that have no usage of WCF, we now try to diagnostic what can happen in MongoDB and its C# driver. All functions are concerned by the problem and all functions use MongoDB. The database itself does not log any long access. The OpLog keeps about 200 days of operations in hour situation. There are about 20 to 50 simultaneous connection between our server app and the DB (and no other app has access to it, except few Mongo consoles). There is no blocking operations at run time (no index creation, for instance), only read/write (insert, save, find, aggregates, etc.). Concerning the driver usage, we still use MongoClient.GetServer deprecated API, as my little company has only port a part of the application to the newer APIs. So this could be the cause of the issue (or using a mix between legacy and current APIs). But we don't know and I'm in hope some answer here can give us information concerning this point.
I know this description is broad and I apologize about that. I'm of course ready to provide any other information that can help in the diagnostic.
Thanks by advance
|
| Comments |
| Comment by Rachelle Palmer [ 25/Jun/20 ] |
|
Hi there, thank you for reaching out to MongoDB. As this sounds more like a support issue, I wanted to give you some resources to get this question answered more quickly:
Thank you! |
| Comment by Mark Mahn [ 10/Jan/20 ] |
|
Experiencing a similar issue. This is extremely problematic and does not happen at least in the last 1.x driver series. I am able to reproduce the issue when backing up our data. For example consider this code below: IEnumerator<BsonDocument> cset = conn.use_db.GetCollection(colname).Find(new QueryDocument()).GetEnumerator(); while (cset.MoveNext()) ) for: ({1}), total: ({2}), elaspsed: [\{3} secs]", colname, identifier, total.ToString(),
Note, in the above code i am timing how long it takes to read 5k documents from the server. I am not writing data in the loop just simply reading documents. Well the problem is in some cases elapsed could be as large as 40 + seconds and as low as 0.5 seconds. When I use the 1.x driver series the time is consistently below 0.87 seconds. Note, i am reading the data from servers in the same data center. I am experiencing this issue at the moment with the 2.9.1 driver. We are forced to rewrite the backup code in java for now since our measurement in java also produced consistent latency all below 1 second. There is something seriously wrong with this driver and most likely not production ready.
|