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

Memory leak in mongos when using auth

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 2.2.1, 2.3.0
    • Affects Version/s: 2.2.0-rc1
    • Component/s: Sharding
    • Environment:
      Linux
      2 Shards
      3 Replica Sets per shard
      Authentication enabled; one admin user, one (sharded) db user. Using simple keyfile.
    • ALL

      When spawning 15 mongo shells which run the following simple script, mongos leaks approximitely 2mb of memory per minute:

      for (i=0;i<10000;i++) { 
          db.getSiblingDB("admin").auth('b', 'b');
      }
      

      The same holds true when authenticating against a sharded database:

      for (i=0;i<10000;i++) { 
          db.getSiblingDB("shtest").auth('a', 'a'); 
      }
      

      Connection pool stats are consistently at 819 during these tests:

              "connections" : {
                      "current" : 16,
                      "available" : 803
              },
      

      No increase in resident memory is observed when sending non-auth commands/queries, such as:

      for (i=0;i<10000;i++) { 
          db.getSiblingDB("admin").stats();
      }
      

            Assignee:
            benjamin.becker Ben Becker
            Reporter:
            benjamin.becker Ben Becker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: