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

Server begin to refuse connections after 200

    XMLWordPrintable

    Details

    • Type: Question
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Works as Designed
    • Affects Version/s: 1.8.1
    • Fix Version/s: None
    • Component/s: Networking
    • Labels:
    • Environment:
      linux macos

      Description

      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)

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: