- 
    Type:Bug 
- 
    Resolution: Won't Fix
- 
    Priority:Blocker - P1 
- 
    Affects Version/s: None
- 
    Component/s: None
- 
    None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
We tested out the new mongo-ruby-driver (using HEAD from Nov, 17), and connection counts to our mongoS increased to the point where it OOM'd multiple mongoS and we had to roll back. We have multiple clusters that each have many databases on them.
With Moped, it only creates 1 connection per host:port pair it seems. For example, I opened up a rails console and connected to every database on one of our clusters (I just ran some .find({}).count() commands). Running netstat only got 1 result:
jonathan:~ $ netstat -an | grep MONGO_IP
tcp4       0      0  192.168.0.13.63049     MONGO_IP.15426    ESTABLISHED
Then I switched to the mongo-ruby-driver and re-ran the exact same command to connect to every database. It created one connection per database.
jonathan:~ $ netstat -an | grep MONGO_IP
tcp4       0      0  192.168.0.13.63425     MONGO_IP.15426    ESTABLISHED
tcp4       0      0  192.168.0.13.63424     MONGO_IP.15426    ESTABLISHED
tcp4       0      0  192.168.0.13.63423     MONGO_IP.15426    ESTABLISHED
tcp4       0      0  192.168.0.13.63422     MONGO_IP.15426    ESTABLISHED
tcp4       0      0  192.168.0.13.63421     MONGO_IP.15426    ESTABLISHED
tcp4       0      0  192.168.0.13.63420     MONGO_IP.15426    ESTABLISHED
tcp4       0      0  192.168.0.13.63417     MONGO_IP.15426    ESTABLISHED
tcp4       0      0  192.168.0.13.63416     MONGO_IP.15426    ESTABLISHED
tcp4       0      0  192.168.0.13.63414     MONGO_IP.15426    ESTABLISHED
tcp4       0      0  192.168.0.13.63413     MONGO_IP.15426    ESTABLISHED
tcp4       0      0  192.168.0.13.63412     MONGO_IP.15426    ESTABLISHED
tcp4       0      0  192.168.0.13.63411     MONGO_IP.15426    ESTABLISHED
tcp4       0      0  192.168.0.13.63410     MONGO_IP.15426    ESTABLISHED
tcp4       0      0  192.168.0.13.63409     MONGO_IP.15426    ESTABLISHED
tcp4       0      0  192.168.0.13.63408     MONGO_IP.15426    ESTABLISHED
Because of the large number of processes and threads we run, this issue completely prevents us from switching to the new driver right now.
