New in version 2.6: The
$maxTimeMSoperator specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.
You can also specify the option in either of the following forms:
Interrupted operations return an error message similar to the following: