<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - Mongo ReplSetConnection]]></title>
		<link>http://railsforum.com/viewtopic.php?id=51800</link>
		<description><![CDATA[The most recent posts in Mongo ReplSetConnection.]]></description>
		<lastBuildDate>Sun, 30 Dec 2012 15:55:25 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Mongo ReplSetConnection]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=157927#p157927</link>
			<description><![CDATA[<p>Hello,</p><p>I&#039;ve a question about the ReplSetConnection. </p><p>My setup is a mongo ReplSet with 2 servers and a initializer file (rails 2.3.3)</p><div class="codebox"><pre><code>       MO_SET = Mongo::ReplSetConnection.new([@settings[&quot;hostA&quot;], @settings[&quot;portA&quot;]], [@settings[&quot;hostB&quot;], @settings[&quot;portB&quot;]], {:pool_size =&gt; 5})
       MO_DB =  MO_SET.db(@settings[&quot;database&quot;])</code></pre></div><p>If hostA is the master and hostB&nbsp; goes down the error occurs</p><div class="codebox"><pre><code>Mongo::ConnectionFailure (Failed to connect any given host:port):
  mongo (1.1.5) lib/./lib/mongo/repl_set_connection.rb:116:in `connect&#039;</code></pre></div><p>How can I prevent this because the master is still up and running? </p><p>Thanks<br />Susann</p>]]></description>
			<author><![CDATA[dummy@example.com (Susann12)]]></author>
			<pubDate>Sun, 30 Dec 2012 15:55:25 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=157927#p157927</guid>
		</item>
	</channel>
</rss>
