# FCGI Dispatch processes running amok

**URL:** <https://www.ruby-forum.com/t/fcgi-dispatch-processes-running-amok/67118>\
**Category:** Rails\
**Created:** [August 31, 2006, 7:26pm UTC](https://www.ruby-forum.com/t/fcgi-dispatch-processes-running-amok/67118 "2006-08-31T19:26:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![subimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@subimage](https://www.ruby-forum.com/u/subimage)\
**Post date:** [August 31, 2006, 7:26pm UTC](https://www.ruby-forum.com/t/fcgi-dispatch-processes-running-amok/67118/1 "2006-08-31T19:26:42Z")

</div>

I’ve deployed 5-6 Rails sites using Apache/FCGI before. On one in  
particular  
I’m having major problems with there being zombie FCGI processes hanging  
around. Sometimes I can get up to 20 on one box, before I have to ssh in  
and  
kill them manually.

Can anyone see a problem with this config file?

 AddHandler fastcgi-script .fcgi

FastCgiIpcDir /var/lib/apache2/fastcgi

FastCgiServer /var/www/edeals/current/public/dispatch.fcgi  
-initial-env  
RAILS\_ENV=production -processes 4 -idle-timeout 60  
FastCgiConfig -minProcesses 4 -maxProcesses 4 -processSlack 1

Also - I’m deploying via Capistrano. Have anything to do with it?

–  
seth at subimage interactive  
[http://www.subimage.com/sublog/](http://www.subimage.com/sublog/)

---

<div class="post-metadata">

**Author:** ![subimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@subimage](https://www.ruby-forum.com/u/subimage)\
**Post date:** [September 4, 2006, 2:44pm UTC](https://www.ruby-forum.com/t/fcgi-dispatch-processes-running-amok/67118/2 "2006-09-04T14:44:02Z")

</div>

Nobody? Come on now…someone’s got to know something.

On 8/31/06, subimage interactive [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> seth at subimage interactive  
> [http://www.subimage.com/sublog/](http://www.subimage.com/sublog/)

–  
seth at subimage interactive  
[http://www.subimage.com/sublog/](http://www.subimage.com/sublog/)

---

<div class="post-metadata">

**Author:** ![subimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@subimage](https://www.ruby-forum.com/u/subimage)\
**Post date:** [September 4, 2006, 2:44pm UTC](https://www.ruby-forum.com/t/fcgi-dispatch-processes-running-amok/67118/3 "2006-09-04T14:44:11Z")

</div>

> > Also - I’m deploying via Capistrano. Have anything to do with it?

Ok I will give it a stab.

I had noticed the zombie processes on my server (Apache 1.3+FCGI) as  
well.  
In my case it was due to logrotate. FCGI processes just didn’t go away  
automatically  
after logrotate runs. I had to modify the logrotate script (httpdlog)  
and added

/bin/killall dispatch.fcgi

to the postrotate section.

Hope this will give you some ideas to troubleshoot with.

Good luck,

Long
