Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1112

When a lot of update, driver throw MongoError: connection 2 to localhost:27017 timed out

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: 2.2.30
    • Fix Version/s: None
    • Component/s: MongoDB 3.2
    • Labels:
    • Environment:
      windows7, nodejs v6.9.4, mongo db version v3.4.4, mongodb-node-driver: "^2.2.30",

      Description

      When I commite a lot of update,(4000+ updates per second), there were some errors like this:
      client:

      { MongoError: connection 2 to localhost:27017 timed out
          at Function.MongoError.create (E:\nodejs\NodeJS.Study\mongo\node_modules\mongodb-core\lib\error.js:29:11)
          at Socket.<anonymous> (E:\nodejs\NodeJS.Study\mongo\node_modules\mongodb-core\lib\connection\connection.js:198:20)
          at Socket.g (events.js:291:16)
          at emitNone (events.js:86:13)
          at Socket.emit (events.js:185:7)
          at Socket._onTimeout (net.js:339:8)
          at ontimeout (timers.js:365:14)
          at tryOnTimeout (timers.js:237:5)
          at Timer.listOnTimeout (timers.js:207:5)
        name: 'MongoError',
        message: 'connection 2 to localhost:27017 timed out' }
      

      db:

      2017-08-05T16:12:37.409+0800 I -        [conn2] end connection 127.0.0.1:28890 (5 connections now open)
      2017-08-05T16:12:37.414+0800 I -        [conn3] AssertionException handling request, closing client connection: 6 socket exception [SEND_ERR
      OR] for 127.0.0.1:28891
      

      I didn't find any solution about this problem.
      The logic code, if I run it in mongo shell, won't throw the Error and everything is ok.

      if there is a misuse, please point it out. I do not use mongodb too long.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            luoyao Yao Luo
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: