Note that there are some explanatory texts on larger screens.

plurals
  1. POCapistrano not restarting Mongrel clusters properly
    primarykey
    data
    text
    <p>I have a cluster of three mongrels running under nginx, and I deploy the app using Capistrano 2.4.3. When I "cap deploy" when there is a running system, the behavior is: </p> <ol> <li>The app is deployed. The code is successfully updated. </li> <li><p>In the cap deploy output, there is this: </p> <ul> <li>executing "sudo -p 'sudo password: ' mongrel_rails cluster::restart -C /var/www/rails/myapp/current/config/mongrel_cluster.yml"</li> <li>servers: ["myip"]</li> <li>[myip] executing command</li> <li>** [out :: myip] stopping port 9096</li> <li>** [out :: myip] stopping port 9097</li> <li>** [out :: myip] stopping port 9098</li> <li>** [out :: myip] already started port 9096</li> <li>** [out :: myip] already started port 9097</li> <li>** [out :: myip] already started port 9098</li> </ul></li> <li>I check immediately on the server and find that Mongrel is still running, and the PID files are still present for the previous three instances. </li> <li>A short time later (less than one minute), I find that Mongrel is no longer running, the PID files are gone, and it has failed to restart. </li> <li>If I start mongrel on the server by hand, the app starts up just fine. </li> </ol> <p>It seems like 'mongrel_rails cluster::restart' isn't properly waiting for a full stop before attempting a restart of the cluster. How do I diagnose and fix this issue?</p> <p>EDIT: Here's the answer: </p> <p>mongrel_cluster, in the "restart" task, simply does this: </p> <pre><code> def run stop start end </code></pre> <p>It doesn't do any waiting or checking to see that the process exited before invoking "start". This is <a href="http://rubyforge.org/tracker/index.php?func=detail&amp;aid=19657&amp;group_id=1336&amp;atid=5291" rel="nofollow noreferrer">a known bug with an outstanding patch submitted</a>. I applied the patch to Mongrel Cluster and the problem disappeared. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload