MongoDB Compass timeouts
Asked Answered
K

2

26

I'm using MongoDB Compass to perform an aggregation on a reasonably large dataset (~2,000,000 documents, 300MB) through an SSH tunnel.

It connects fine and I can query but stages in my pipeline appear to timeout operation exceeded time limit.

enter image description here

I know via the command line you can set the max time in milliseconds for a query using maxTimeMs $maxTimeMS but is it possible to apply this in MongoDB Compass?

I have also looked for connection timeout settings and can't find anything related to that in the GUI.

Knotts answered 4/4, 2019 at 7:44 Comment(4)
I've just managed to fix the above by moving the $match to happen first but this question still appliesKnotts
having the same issue with aggregate. Is it possible to change timeout setting?Norrie
I've found in /usr/share/mongodb-compass-community-beta/resources/app.asar that there is a constant const DEFAULT_MAX_TIME_MS = 10000;. I have tried to unpack the asar file and succeed, and then found two files where the constant appears. But I found no way to rebuild the app.asar file.Indecisive
I've open a ticket on mongoDB JIRA : jira.mongodb.org/browse/COMPASS-3753Indecisive
E
19

In Compass 1.19-beta we added an option to set maxTimeMS in the aggregation pipeline builder and in the query bar.

Compass 1.19 agg builder options

Eberly answered 1/8, 2019 at 20:1 Comment(3)
Looks a little different in the non-beta version 1.19.12 (1.19.12) which you can find by clicking options to the right of the filter search bar and MAXTIMEMS will be there.Ruvolo
Does this timeout apply to the "Explain Plan" tab? It doesn't appear to. Is there a way to extend that timeout?Sherard
For Explain plan (and similarly, for Schema and regular queries in the Documents tab), you have a maxTimeMS field in the query bar. Click on Options to expand it and see all the options.Eberly
D
13

To anyone came here to fix this problem on other tabs.

in filter search click on options when it expands, change MAXTIMEMS to any second you want, the value must be in millisecond.

then you can use FIND, ANALYZE or EXPLAIN depends on the tab you chose.

mongodb compass

Dunkin answered 27/9, 2020 at 8:49 Comment(1)
Thanks a million. I was looking for this all over the town.Reinhardt

© 2022 - 2024 — McMap. All rights reserved.