Mongo DB "Your question took too long": collection with 18M records

Hi there,
I’ve installed the Mac app and connected with a Mongo DB instance and I can see the data in a collection with more than 18M records (by using the “Browse Data”) but when I try to ask a question that just counts the number of records I get an error “Your question took too long”.
I can see that the same query in RoboMongo works without a problem.

The query is just: [{"$group":{"_id":null,“count”:{"$sum":1}}},{"$sort":{"_id":1}},{"$project":{"_id":false,“count”:true}}]

Can anyone please help me?


How long does it take to run the query on Robo?
Are you getting more detailed errors in Admin > Troubleshooting > Logs?
I would recommend not using the Mac App, since it comes with the limitations of running in a restricted environment.

Hi @flamber,
Thanks for the help.
It takes 43 seconds.
I don’t see any errors in the Logs related to the query.

Please post “Diagnostic Info” from Admin > Troubleshooting.
There should be a cancelled request (and normally an error too) in the log. Can you post everything around the time, when you run the query?
Can you try the JAR or Docker instead of the Mac App?

Hi @flamber,
I’ve downloaded the jar and it’s working fine.
Thanks for the help!

Best regards,

1 Like