question about query-level timeouts

7 views
Skip to first unread message

Gregg Caines

unread,
Nov 17, 2015, 8:36:38 PM11/17/15
to node-mongodb-native
Hey All...

I wonder if anyone can tell me how to get timeouts for queries that are taking too long (maybe a 5 s threshold).  I guess I'm thinking about something like $maxTimeMS (described here: https://docs.mongodb.org/v3.0/reference/operator/meta/maxTimeMS/ ), but on more of a global level.  Is this possible?  Or do I have to use $maxTimeMS in all my queries?

Thanks!

Gregg

Christian Kvalheim

unread,
Nov 18, 2015, 7:21:53 AM11/18/15
to node-mongodb-native
Hi Gregg

At this time there is no plan to make it more of a global setting. You have to set maxTimeMS on the individual operations that support it by passing it in as an option. See the docs for what ops on the driver support it.

Reply all
Reply to author
Forward
0 new messages