top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

MongoDB: WiredTiger Open Cursor Count

+1 vote
699 views

Can someone please explain the difference between db.serverStatus().metrics.cursor and db.serverStatus().wiredTiger.session with regards to open cursor count and open session count.?

I am seeing different values in these fields (specifically a high and increasing value for WiredTiger) and I want to be sure that I have been releasing cursors where necessary. I cannot see much information in the docs for WiredTiger.

posted Jul 20, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

The difference in the two statistics you mention is due to two factors:
* MongoDB caches WiredTiger cursors for re-use.
* WiredTiger cursors don't correspond one-to-one with MongoDB cursors.

From the perspective of your application correctness you should monitor db.serverStatus().metrics.cursor

answer Dec 8, 2015 by Manikandan J
Similar Questions
0 votes

I am new to mongodb. I am trying to do some aggregation operations like sum, avg, min.. on a collection. And I found that I can do it either using aggregation framework or cursor.forEach(). Which one to use? It will be better if someone explains how both works internally and give me some suggestions.

Thank you in advance

0 votes

We have a 3 server MongoDB cluster where there is one Primary, one secondary and one hidden. In one of our collections data gets only inserted by the front end APP and cannot be deleted. I am seeing a strange behavior - when I run count query on this collection (from shell) I always see secondary's count 1-2 more than the count on Primary.

Is this possible or is there some mismatch in my configuration?

...