question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add maxTime option to all queries

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:22 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
vkarpov15commented, Apr 13, 2019

@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

1reaction
vkarpov15commented, Jan 16, 2018

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found