Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3321

Server begin to refuse connections after 200

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.8.1
    • Component/s: Networking
    • Labels:
    • Environment:
      linux macos

      If I connect to mongodb quickly in very short time. Mongodb server will soon be un-responsable and pymongo driver will raise an exception

      even I tried sleep 1 sec, After about 200 connections mongo server begin to refuse connections

      I have a production server splited in several processes when they connect to mongodb at the same time the problem will show up

      reproduce the problem use the code below
      macbook pro

      from pymongo.errors import OperationFailure, AutoReconnect
      from pymongo import Connection
      import time

      l = []
      for i in xrange(5000):
      conn = Connection('localhost',45678)
      #time.sleep(1)#remove comment will make to 200 conns
      l.append(conn)
      time.sleep(300)

            Assignee:
            scotthernandez Scott Hernandez (Inactive)
            Reporter:
            dawn davyzhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: