[SERVER-8188] Configurable idle cursor timeout Created: 14/Jan/13 Updated: 07/Jun/19 Resolved: 13/Mar/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 2.6.9, 3.0.2, 3.1.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Ben McCann | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 10 |
| Labels: | cursor, cursors | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Backport Completed: | |||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
| Comments |
| Comment by Githook User [ 25/Mar/15 ] |
|
Author: {u'username': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: (cherry picked from commit 4d7b131c5454bf56fd494b1a3537eeb5e221a027) |
| Comment by Githook User [ 13/Mar/15 ] |
|
Author: {u'username': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: (cherry picked from commit 4d7b131c5454bf56fd494b1a3537eeb5e221a027) |
| Comment by Githook User [ 13/Mar/15 ] |
|
Author: {u'username': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: |
| Comment by Daniel Pasette (Inactive) [ 18/Jun/14 ] |
|
Thanks Ben. I updated the ticket slightly to better reflect the request. |
| Comment by Ben McCann [ 18/Jun/14 ] |
|
We have some jobs that do heavy data processing. We grab a bunch of records from MongoDB, do some processing, grab more records. If that processing takes too long then sometimes the cursor times out. We can set it to never, but that doesn't seem like a great idea. If our client crashes before exhausting the cursor then it'll just live on the server forever. |
| Comment by Daniel Pasette (Inactive) [ 18/Jun/14 ] |
|
Idle cursors is a server side concept. By default, idle cursors are reaped on the server after 10 minutes (to prevent excess memory use). The client can only control it by setting the cursor to never timeout. What's your use case for configuring the idle cursor timeout on the client side? |
| Comment by Ben McCann [ 18/Jun/14 ] |
|
Hi, it seems I may have been conflating two issues not realizing they're separate issues. I do still care about the timeout for idle cursors as well. Is idle cursors only a client concept? |
| Comment by Daniel Pasette (Inactive) [ 15/Jun/14 ] |
|
chengas123, looking for some clarification on this ticket. The 10 minute timeout you mentioned is for idle cursors, but from the context of the description, it looks like you were really interested in server side operation timeouts, as implemented in |
| Comment by Jeffrey Yemin [ 30/Dec/13 ] |
|
This looks to be a duplicate of |
| Comment by Jeffrey Yemin [ 15/Jan/13 ] |
|
Moved it over. |
| Comment by Ben McCann [ 15/Jan/13 ] |
|
Ok, sounds like this should be filed under the core server component instead then. |
| Comment by Jeffrey Yemin [ 14/Jan/13 ] |
|
This is not configurable on the server, so it would only be client-side, and it seems you can already do it by setting the socketTimeout property, e.g. https://github.com/mongodb/mongo-java-driver/blob/master/src/main/com/mongodb/MongoClientOptions.java#L143 There is currently no way to configure a different timeout for different server operations. The socketTimeout applies to queries and all commands. |