Getting different shards for db.stats from MongoS

Hi Team,

We have 6 mongos with 3 shards, 3 config servers and about 5 databases on it.
It seems we are getting different db.stats() info for a database in MongoS.
Let say we have mongos[1-6] and in MongoS[1,3,4,5] we are getting db.stats() for a db DB_N1 like below.

In MongoS[1,3,45]
db.stats()
rep1A/server1:port,server2:port

In MongoS[2,6]
db.stats()
rep2A/server3:port,server4:port

MongoDB version we are using is 2.6.3 and config servers are in sync.

Thanks in advance and also let me know if any details require.

Cheers,
Mukesh Kumar

:wave:

Hi @Mukesh_kumar and welcome to the MongoDB community forums.

While I don’t have an answer to your question, I will ask if you are able to upgrade your MongoDB implementation and test to see if you see similar results. MongoDB 2.6 is a very old version and support for it ended towards the end of 2016. There have been a lot of performance and security improvements since then as well as the addition of a lot of new functionality.

Being on a version that old means that there will be less people available to help out determine why you are seeing what you are seeing and to provide support to resolve any issues.

1 Like

I understand it’s old version but it’s quiet difficult to understand why different MongoS of same cluster is showing different db stats for a database. Has anyone reported about it?
Can you please suggest what to debug? I did this to debug but it doesn’t help me.

  1. stop the balancer -> stop the mongos(where we have issue) -> remove it from mongos collection of config db. still no luck.
  2. stop the balancer -> stop the mongos(where we have issue) -> run it on same with different path of config like pid, logs. Still no luck.

Let me know if I should do something else or I missed some steps. I never faced such issues.

Cheers,
Mukesh Kumar

Hi Mukesh,

The MongoDB 2.6 release series first shipped in March, 2014 and reached end of life in Oct 2016. There have been significant architectural changes and improvements in the six (and soon to be seven) major production release series since then.

It is quite possible you are encountering an issue which has been fixed some time in the past 6 years. If your issue is easily reproducible, you should be able to reproduce it in a test/staging environment. Please upgrade to a supported version of MongoDB (currently 3.6 or newer) and test if the problem is still occurring.

I would also recommend an immediate upgrade from 2.6.3 to the final 2.6.12 version. Minor releases do not include any backward-breaking changes and there are important stability, security, and performance fixes.

Regards,
Stennie

2 Likes

@Stennie_X Thanks for the updates. Also to immediate upgrade from 2.6.3 to the final 2.6.12, Can we stop the mongo v2.6.3 and start it with v.2.6.12 or should I follow upgradation processes like https://docs.mongodb.com/manual/release-notes/3.0-upgrade/

Cheers,
Mukesh Kumar

Upgrade the binaries and start/restart.

@chris Thanks for the quick response, do you mean replace 2.6.3 binaries with 2.6.12 and restart the MongoDB servers?

Yes. Read the guide for full details.

2 Likes

@chris Thanks yoy so much for the help.