# Dispatch.fcgi is hanging indefinitely

**URL:** <https://www.ruby-forum.com/t/dispatch-fcgi-is-hanging-indefinitely/184282>\
**Category:** Rails\
**Created:** [February 28, 2010, 3:05am UTC](https://www.ruby-forum.com/t/dispatch-fcgi-is-hanging-indefinitely/184282 "2010-02-28T03:05:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vfclists](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5f9b8f/32.png) [@vfclists](https://www.ruby-forum.com/u/vfclists)\
**Post date:** [February 28, 2010, 3:05am UTC](https://www.ruby-forum.com/t/dispatch-fcgi-is-hanging-indefinitely/184282/1 "2010-02-28T03:05:15Z")

</div>

I am getting a Rails application failed to start properly.

When I use webrick it is alright. The problem appears to come from the  
fcgi part.

when I run ./dispatch.fcgi or ruby dispatch.fcgi the it hangs  
indefintely.

# This is the error I get in the main server log

[notice] mod\_fcgid: process /home/pydev/rubystack/html/rdm/  
dispatch.fcgi(10045) exit(communication error), terminated by calling  
exit(), return code: 1

# This is the error I get in the domain’s log

[Sun Feb 28 01:57:51 2010] [warn] (104)Connection reset by peer:  
mod\_fcgid: read data from fastcgi server error.  
[Sun Feb 28 01:57:51 2010] [error] [client 192.168.1.20] Premature end  
of script headers: dispatch.fcgi

Any ideas?

---

<div class="post-metadata">

**Author:** ![vfclists](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/5f9b8f/32.png) [@vfclists](https://www.ruby-forum.com/u/vfclists)\
**Post date:** [March 10, 2010, 10:50pm UTC](https://www.ruby-forum.com/t/dispatch-fcgi-is-hanging-indefinitely/184282/2 "2010-03-10T22:50:06Z")

</div>

Old post… Anyway, I guess you get this problem from running  
production but not on development. It is that the fcgi process gets  
killed before it finishes the process. This could be from huge  
database manipulation. You can try to find it by comment a certain  
part of your code and see if it is still running.
