0

I am using mongodb 3.0.2 and when I run "top" command :

> db.runCommand( { top: 1 } )

I got the following error message:

2015-06-01T16:36:52.886+0900 E QUERY Error: error: { "$err" : "BSONObj size: 46060490 (0x2BED3CA) is invalid. Size must be between 0 and 16793600(16MB)", "code" : 10334 } at Error () at DBQuery.next (src/mongo/shell/query.js:259:15) at DBCollection.findOne (src/mongo/shell/collection.js:189:22) at DB.runCommand (src/mongo/shell/db.js:58:41) at (shell):1:4 at src/mongo/shell/query.js:259

It means that I can't monitor any longer, doesn't it? Can you guys show me the way out, please.

Some additional info:

  • DB size: 143.996GB - with wiredtiger enable.
  • Replication set enable.
  • No profiling.
Dhanuka
  • 2,826
  • 5
  • 27
  • 38
nthien
  • 1
  • Are you issuing the command against the admin database? If not, you could try `db.adminCommand("top")` or run the command `use admin` first before `db.runCommand( { top: 1 } )`. Example [**here**](http://docs.mongodb.org/manual/reference/command/top/#example). – chridam Jun 01 '15 at 10:29
  • By the way, understand that [**top**](http://docs.mongodb.org/manual/reference/command/top/#top) is an administrative command that returns usage statistics for each collection and provides amount of time, in microseconds, used and a count of operations. From your question title I think you are looking for the [**`limit`**](http://docs.mongodb.org/manual/reference/method/db.collection.find/#limit-the-number-of-documents-to-return) method to limit the number of documents in the result set. – chridam Jun 01 '15 at 10:43
  • Thanks you for your help, i have done exactly as the example. But the issue still there. I have more than 100 collections, maybe it is too many of them. From the title i think this issue is a limitation of mongo: could not query more than 16MB documents. – nthien Jun 03 '15 at 01:26

0 Answers0