Details

    • Backwards Compatibility:
      Fully Compatible
    • Backport Completed:

      Description

      Issue Status as of Mar 17, 2015

      ISSUE SUMMARY
      Client cursors that are no longer used may not be closed by the server. These cursors continue to consume resources inside mongod. By default, inactive cursors expire after 10 minutes, this option makes it possible to configure this timeout.

      RESOLUTION DETAILS
      By specifing the cursorTimeoutMillis option, administrators can configure mongod or mongos to automatically remove idle client cursors after a specified interval. The timeout applies to all cursors maintained on a mongod or mongos, may be specified when starting the mongod or mongos and may be modified at any time using the setParameter command. Consider the following examples.

      On startup:

      mongod --setParameter cursorTimeoutMillis=<num>
      

      or:

      mongos --setParameter cursorTimeoutMillis=<num>
      

      During operation, using the mongo shell:

      use admin
      db.runCommand({setParameter:1, cursorTimeoutMillis: <num>})
      

      Original description

      The only options for timeout are 10 minutes or disabled. It would be very nice to be able to set this to other lengths of time.

        Issue Links

          Activity

          Hide
          chengas123 Ben McCann added a comment -

          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.

          Show
          chengas123 Ben McCann added a comment - 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.
          Hide
          pasette Dan Pasette added a comment -

          Thanks Ben. I updated the ticket slightly to better reflect the request.

          Show
          pasette Dan Pasette added a comment - Thanks Ben. I updated the ticket slightly to better reflect the request.
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

          Message: SERVER-8188: make cursor timeout configurable on server
          Branch: master
          https://github.com/mongodb/mongo/commit/4d7b131c5454bf56fd494b1a3537eeb5e221a027

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'} Message: SERVER-8188 : make cursor timeout configurable on server Branch: master https://github.com/mongodb/mongo/commit/4d7b131c5454bf56fd494b1a3537eeb5e221a027
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

          Message: SERVER-8188: make cursor timeout configurable on server

          (cherry picked from commit 4d7b131c5454bf56fd494b1a3537eeb5e221a027)
          Branch: v2.6
          https://github.com/mongodb/mongo/commit/e3a769273df9e1217a9c85d067db058e4293952f

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'} Message: SERVER-8188 : make cursor timeout configurable on server (cherry picked from commit 4d7b131c5454bf56fd494b1a3537eeb5e221a027) Branch: v2.6 https://github.com/mongodb/mongo/commit/e3a769273df9e1217a9c85d067db058e4293952f
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

          Message: SERVER-8188: make cursor timeout configurable on server

          (cherry picked from commit 4d7b131c5454bf56fd494b1a3537eeb5e221a027)
          Branch: v3.0
          https://github.com/mongodb/mongo/commit/d9a3c65f642ce90b1cf6f725786654998676cd20

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'} Message: SERVER-8188 : make cursor timeout configurable on server (cherry picked from commit 4d7b131c5454bf56fd494b1a3537eeb5e221a027) Branch: v3.0 https://github.com/mongodb/mongo/commit/d9a3c65f642ce90b1cf6f725786654998676cd20

            People

            • Votes:
              10 Vote for this issue
              Watchers:
              18 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: