- Reference >
- Operators >
- Query Modifiers >
- $maxTimeMS
$maxTimeMS¶
-
$maxTimeMS
¶ Deprecated since v3.2
Starting in v3.2, the
$maxTimeMS
operator is deprecated in themongo
shell. In themongo
shell, usecursor.maxTimeMS()
instead.The
$maxTimeMS
operator specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.The
mongo
shell provides thecursor.maxTimeMS()
methodYou can also specify the option in either of the following forms:
Interrupted operations return an error message similar to the following: