[CSHARP-1536] Cursor do not get closed Created: 17/Jan/16  Updated: 13/Apr/16  Resolved: 13/Apr/16

Status: Closed
Project: C# Driver
Component/s: Connectivity
Affects Version/s: 2.0.2, 2.1.1, 2.2.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Moshe Shperling Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows Server 2012, Mongodb 3.0.5 on Centos 7


Issue Links:
Related
is related to CSHARP-1515 Queries using the Legacy API can leak... Closed

 Description   

Hi everyone

Last week I have installed 2.1.1.5 (we used old legacy driver before) and noticed following serious problem:
cursors do not get closed but getting iddle being stuck in RAM.
Just to compare: in mms monitoring before upgrade we had 500 cursors in the air and now we 13.5K and the number is growing. After it reaches the cursors limit all system crashes.
There are similar tickets:
https://jira.mongodb.org/browse/SERVER-19061
https://jira.mongodb.org/browse/SERVER-17364

but they speak about mongo version problem. I do not think that this is the problem by us since we have 3.05 for half a year already and we did not have it before. Anyway i decreased cursors timeout but it does not seem to help because the cursors number is constantly growing.



 Comments   
Comment by Robert Stam [ 18/Jan/16 ]

The underlying issue that was fixed in CSHARP-1515 was that the client side cursor enumerator was not being properly Disposed (whether the cursor was enumerated all the way to the end or not).

I'm pretty sure what you are seeing is just a different manifestation of the same problem. In your case it would appear that you are only partially consuming the results of the cursor. Since the client side cursor is not being properly disposed, the symptom is that the cursor continues to live on the server side.

I have high confidence that the fix for CSHARP-1515 will also fix your issue. If you continue to see this issue with 2.2.2 please let us know.

The "timeout after 0ms" issue was actually a separate issue. The error message was incorrectly reporting "0ms" instead of the actual timeout value.

Comment by Moshe Shperling [ 18/Jan/16 ]

Hi Craig
Just want to be sure. We get different exception here not like 1515. In this case it seems like driver does not kill idle cursors. Did you fix it in new version? Did you also fix timeout 0ms issue there as well?

Comment by Craig Wilson [ 17/Jan/16 ]

Hi Moshe,

The cursor problem is related to the issue in CSHARP-1515. We have fixed this issue and released driver version 2.2.2. You should upgrade to this version for the fix.

Craig

Generated at Wed Feb 07 21:39:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.