Couldn't find any pid ... matching 'dispatch.[0-9]*.pid'

I have Capistrano working great on about 6 projects, but for a couple I
end up getting a message like this at the end:

Couldn’t find any pid file in ‘/u/apps/project/current/tmp/pids’
matching ‘dispatch.[0-9]*.pid’

I end up SSHing in to restart Apache, but I’d rather not have to. Any
ideas? I’m sure its probably trivial… perhaps Capistrano isn’t
correctly setup or some files/directories are missing.

James R. wrote:

I have Capistrano working great on about 6 projects, but for a couple I
end up getting a message like this at the end:

Couldn’t find any pid file in ‘/u/apps/project/current/tmp/pids’
matching ‘dispatch.[0-9]*.pid’

I end up SSHing in to restart Apache, but I’d rather not have to. Any
ideas? I’m sure its probably trivial… perhaps Capistrano isn’t
correctly setup or some files/directories are missing.

It seems the problem is that repear.rb in Edge rails is a bit different
than that of the current Gems. The Edge Rails version is looking in
tmp/pids for pid files, but there is nothing there. The Gem version
simply looks for the correct dispatch.fcgi process, and finds it.

How do I get around this? What changes/assumptions are being made in the
current EdgeRails that I should be aware of?

Any comment is appriciated.

Thanks.

from the Railties CHANGELOG:

  • Added pid file usage to script/process/spawner and
    script/process/reaper along with a directive in default
    config/lighttpd.conf file to record the pid. They will all save their
    pid file in tmp/pids [DHH]

…now to figure out to how to get Apache 1.3/mod_fcgi to record the
PIDs for each process.

Try overriding the restart task by adding the following to deploy.rb:

desc “restart override”
task :restart, :roles => :app do
run “killall -9 ruby”
end

You may need to change the command depending on your hosting provider -
the above works for dreamhost.

found a solution?

On 9 Set 2006, 20:15, James R. [email protected]