title: Lost connection to MySQL server during query error with Rails3, octopus replication gem
body: <p>I just upgrade my web service from Rails 2.3.8 to Rails 3.0.3</p>
  
  <p>It's almost working well.</p>
  
  <p>I has one problem, Lost connection error is occurred when the service is deployed with capistrano. About 3 times occurred every deployment. 
  The service use octopus gem from <a href="https://github.com/tchandy/octopus" rel="nofollow">https://github.com/tchandy/octopus</a> for database replication with 1 master database and 2 slave database.</p>
  
  <p>Mysql::Error: Lost connection to MySQL server during query: SELECT  <code>regions</code>.* FROM <code>regions</code> WH ...</p>
  
  <p>The problem is not occurred when octopus is not used with single database. But replication is needed for traffic.</p>
  
  <p>Please, give me any advise. Thank you.</p>