0

We have some weird problem where we can't run db.collection.stats(). So I am looking for other way like querying form some collection in mongo to map it some how ?

I am not able to find any collection in shard databases to show that information. If anyone have some idea about finding this information it would be helpful to us.

At this moment I can collect this only with db.collection.stats() , I tried looking around in admin, local and config databases in shard. not sure where else to check.

I am expecting mongo have some place where it maps collection name and WireTiger URI of the file want to know how to check directly from some place .

  • 1
    Please be more specific about your problem. Why can't you run `db.collection.stats()`? Is the problem that there's just a limitation to your environment? Do you not have access credentials? Is your database user not permitted to run that command? Are you receiving an error? If it's possible to resolve the root cause of your problem, then you won't need a workaround, but we can't resolve the problem without knowing what the problem actually is. Provide us with sufficient context and we'll be able to provide a more suitable solution for your problem. – B. Fleming Aug 23 '19 at 19:51
  • Hello Freming. Our problem is unique to our environment . We have so many collections and indexes if we run collection stats for all of the collections , mongo will open handlers for each collection and index that will be 800k per shard which freezes new connections to mongo when doing handler sweep(which take logs because of too many handlers) We have very long history for the issue . But for now we want to avoid that and our own way of finding collection size by directly checking file size in the file systems but somehow should be able to map it without collection stats command . – Uday Bhaskar Aug 25 '19 at 00:09

0 Answers0