-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.8.2
-
Component/s: Replica Set
-
None
-
Environment:Ruby 1.9.3, Centos 5/Fedora 16
I've been debugging Sidekiq workers eventually causing massive system issues due to hundreds of open sockets to my Mongo servers. I've managed to reproduce a failing case:
require 'mongo'
$client = Mongo::MongoReplicaSetClient.new(['192.168.4.139:27021'], :pool_size => 5)
while true
begin
$stderr.puts $client["test"]["test"].find().first.inspect
rescue
ensure
$stderr.puts "%s open file handles" % `lsof -p #
| grep 27021 | wc -l`.strip
end
end
In this case, the given replica set seed node is up, but the other members are down. I'm not sure yet if replica set up/down state is relevant, but if you run that script, you'll notice that the number of open file descriptors rises (and will continue to until your system runs out of available FDs).
I'm working on tracking down and patching it, but figured I'd report it anyhow.