Add maxTime option to all queries
See original GitHub issueI would like to add the option for maxTime(ms) for all models queries (find, update, findOneAndUpdate, etc…).
for example:
A.findOneAndUpdate(id, updateObject, {maxTime: 1000}}, callback)
Issue Analytics
- State:
- Created 7 years ago
- Comments:22 (3 by maintainers)
Top Results From Across the Web
Adjust Maximum Time for Query Operations - MongoDB
The MAX TIME MS query bar option sets the cumulative time limit in milliseconds to process query ... The default MAX TIME MS...
Read more >How to set a maximum execution time for a mysql query?
SELECT /*+ MAX_EXECUTION_TIME(1000) */ --in milliseconds * FROM table;. Note that this only works for read-only SELECT statements. Update: This ...
Read more >MongoDb max timeout for all queries - DBA Stack Exchange
As at MongoDB 3.4, the $maxTimeMS value is a cursor option that needs to be set by the client/driver making the request.
Read more >Server-side SELECT statement timeouts - MySQL
A time limit for any SELECT statement run against a MySQL instance can be set by specifying a timeout value in milliseconds for...
Read more >Setting Query Limits
Enable: This limits the time to the value specified. · Disable: Disables any limits set in the Max Time field. · Warn: Does...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@freewil yes it would. I’m going to be writing a blog post on maxTimeMS next week that you should keep an eye out for. MaxTimeMS has some caveats
@santimendoza the option is maxTimeMS http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#findOne we will add it to the mongoose docs