Topic: Restarting fcgi from controller
So I finally got my site up at hostingrails, and I wanted to hone the update process. When logged in as an administrator, I have a page where I can do a 1-click update. My controller code spawns a ruby process that runs an update script. The update scripts does an svn update, and if there are new files, it's supposed to restart the server.
The problem is that I haven't been able to successfully kill the dispatch.fcgi processes. I was wondering if anybody else has tried to do the same thing as I. In about two months, I will just run a cron job (which shouldn't have these issues), but for now I'd like to do it from the browser.
All I've been able to get is making one of the fcgi processes a zombie. And since it's parent doesn't restart, the 'old' version of my files may still be loaded. I've tried spawning the ruby script with nohup, I've tried forking and Process.detach, and I've tried exec'ing killall, and nothing has worked the way I thought it would.
Last edited by bkrahmer (2007-01-26 01:26:56)