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

**URL:** <https://www.ruby-forum.com/t/couldnt-find-any-pid-matching-dispatch-0-9-pid/68147>\
**Category:** Rails\
**Created:** [September 9, 2006, 7:55pm UTC](https://www.ruby-forum.com/t/couldnt-find-any-pid-matching-dispatch-0-9-pid/68147 "2006-09-09T19:55:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yankees26](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/eb9ed0/32.png) [@yankees26](https://www.ruby-forum.com/u/yankees26)\
**Post date:** [September 9, 2006, 7:55pm UTC](https://www.ruby-forum.com/t/couldnt-find-any-pid-matching-dispatch-0-9-pid/68147/1 "2006-09-09T19:55:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![yankees26](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/eb9ed0/32.png) [@yankees26](https://www.ruby-forum.com/u/yankees26)\
**Post date:** [September 9, 2006, 9:06pm UTC](https://www.ruby-forum.com/t/couldnt-find-any-pid-matching-dispatch-0-9-pid/68147/2 "2006-09-09T21:06:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![yankees26](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/eb9ed0/32.png) [@yankees26](https://www.ruby-forum.com/u/yankees26)\
**Post date:** [September 9, 2006, 9:15pm UTC](https://www.ruby-forum.com/t/couldnt-find-any-pid-matching-dispatch-0-9-pid/68147/3 "2006-09-09T21:15:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![yankees26](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/eb9ed0/32.png) [@yankees26](https://www.ruby-forum.com/u/yankees26)\
**Post date:** [March 15, 2007, 10:53pm UTC](https://www.ruby-forum.com/t/couldnt-find-any-pid-matching-dispatch-0-9-pid/68147/4 "2007-03-15T22:53:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![yankees26](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/eb9ed0/32.png) [@yankees26](https://www.ruby-forum.com/u/yankees26)\
**Post date:** [March 9, 2007, 5:23pm UTC](https://www.ruby-forum.com/t/couldnt-find-any-pid-matching-dispatch-0-9-pid/68147/5 "2007-03-09T17:23:54Z")

</div>

found a solution?

On 9 Set 2006, 20:15, James R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
