# 500 Server Error - stumping me at the moment

**URL:** <https://www.ruby-forum.com/t/500-server-error-stumping-me-at-the-moment/57670>\
**Category:** Rails\
**Created:** [April 12, 2006, 10:01pm UTC](https://www.ruby-forum.com/t/500-server-error-stumping-me-at-the-moment/57670 "2006-04-12T22:01:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rjlyders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@rjlyders](https://www.ruby-forum.com/u/rjlyders)\
**Post date:** [April 12, 2006, 10:01pm UTC](https://www.ruby-forum.com/t/500-server-error-stumping-me-at-the-moment/57670/1 "2006-04-12T22:01:25Z")

</div>

I’m trying to deploy an app on Dreamhost and I’m getting the infamous  
500 Server Error.

Nothing in the rails logs because it looks to be happening before it  
gets there.

In the apache error logs we have:

[Wed Apr 12 12:51:51 2006] [error] [client 194.80.32.9] FastCGI: comm  
with (dynamic) server  
“/home/rlivsey/thatsprogress.com/current/public/dispatch.fcgi” aborted:  
(first read) idle timeout (120 sec)

[Wed Apr 12 12:51:51 2006] [error] [client 194.80.32.9] FastCGI:  
incomplete headers (0 bytes) received from server  
“/home/rlivsey/thatsprogress.com/current/public/dispatch.fcgi”

Any ideas on what that means and how to fix it?

I’ve run through the usual list of things and nothing seems to be  
working.

Running script/console works fine  
Running dispatch.\* from the command line results in the Application  
error (Apache) being output.

This happened when I uploaded the latest codebase. I didn’t overwrite  
anything in the /public/ directory, so the dispatch.\* etc are the same  
as they were when they were working.

It has me a bit confused!

Any help would be gratefully appreciated.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![rjlyders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@rjlyders](https://www.ruby-forum.com/u/rjlyders)\
**Post date:** [April 12, 2006, 10:42pm UTC](https://www.ruby-forum.com/t/500-server-error-stumping-me-at-the-moment/57670/2 "2006-04-12T22:42:37Z")

</div>

I had this if my models or controllers had puts in

Richard L. wrote:

> I’m trying to deploy an app on Dreamhost and I’m getting the infamous  
> 500 Server Error.
> 
> Nothing in the rails logs because it looks to be happening before it  
> gets there.
> 
> In the apache error logs we have:
> 
> [Wed Apr 12 12:51:51 2006] [error] [client 194.80.32.9] FastCGI: comm  
> with (dynamic) server  
> “/home/rlivsey/thatsprogress.com/current/public/dispatch.fcgi” aborted:  
> (first read) idle timeout (120 sec)
> 
> [Wed Apr 12 12:51:51 2006] [error] [client 194.80.32.9] FastCGI:  
> incomplete headers (0 bytes) received from server  
> “/home/rlivsey/thatsprogress.com/current/public/dispatch.fcgi”

---

<div class="post-metadata">

**Author:** ![rjlyders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@rjlyders](https://www.ruby-forum.com/u/rjlyders)\
**Post date:** [April 12, 2006, 11:05pm UTC](https://www.ruby-forum.com/t/500-server-error-stumping-me-at-the-moment/57670/3 "2006-04-12T23:05:25Z")

</div>

Just checked and searched the source of /app/ dir and there are no files  
with puts in them.

Confusing the hell out of me!

Thanks for the suggestion - will keep on trying things :o)

–  
R.Livsey

> **[Livsey.org](http://livsey.org)**
>
> I’ve been using Firebase with Ember.js quite a lot recently and have just
> released Fireplace, a library to integrate the two more easily. It

---

<div class="post-metadata">

**Author:** ![rjlyders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@rjlyders](https://www.ruby-forum.com/u/rjlyders)\
**Post date:** [April 13, 2006, 1:32am UTC](https://www.ruby-forum.com/t/500-server-error-stumping-me-at-the-moment/57670/4 "2006-04-13T01:32:19Z")

</div>

Also running webrick in debug mode can be very helpful

ruby -d scripts/server

---

<div class="post-metadata">

**Author:** ![rjlyders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@rjlyders](https://www.ruby-forum.com/u/rjlyders)\
**Post date:** [April 13, 2006, 1:37am UTC](https://www.ruby-forum.com/t/500-server-error-stumping-me-at-the-moment/57670/5 "2006-04-13T01:37:04Z")

</div>

I’ve had sim. issues if I have something in one of my environment files  
that isn’t supported/installed on the server…for example I had ferret  
installed on my dev machine but forgot to install it on the production  
one, so when I released the code the site wouldn’t load (fcgi was acting  
like it was crashing, but it was because when loading it couldn’t deal  
with a require line that my environment had)…

The webrick suggestion above is a good way to find out for sure…if you  
can load your app with Webrick on the server, then you are likely  
looking at something specific to your fcgi configuration…but my guess  
is that it’s something one of your scripts is trying to do that is  
causing the whole site to error out…

---

<div class="post-metadata">

**Author:** ![rjlyders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@rjlyders](https://www.ruby-forum.com/u/rjlyders)\
**Post date:** [April 13, 2006, 1:13am UTC](https://www.ruby-forum.com/t/500-server-error-stumping-me-at-the-moment/57670/6 "2006-04-13T01:13:53Z")

</div>

Try running script/server from your Dreamhost shell account and see  
what happens. If you can access your app at the default WEBrick port  
(3000), then it is a FastCGI issue.

On 4/12/06, Richard L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > >
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–

---

<div class="post-metadata">

**Author:** ![rjlyders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@rjlyders](https://www.ruby-forum.com/u/rjlyders)\
**Post date:** [April 13, 2006, 3:03am UTC](https://www.ruby-forum.com/t/500-server-error-stumping-me-at-the-moment/57670/7 "2006-04-13T03:03:44Z")

</div>

script/server runs without a hitch and the site runs through port 3000  
(albeit slowly!), so it’s definitely something non rails related - ie  
fcgi.

When I set cgi as opposed to fcgi in the htaccess I still get the same  
error.

Trying to run dispatch.rb and dispatch.cgi from the command line result  
in the same error as the fcgi one:

[barry]$ ./public/dispatch.rb  
Status: 500 Internal Server Error  
Content-Type: text/html

# Application error (Apache)
Loaded suite ./public/dispatch Started

Finished in 0.000439 seconds.

0 tests, 0 assertions, 0 failures, 0 errors

Any ideas on how to track this down further?

Thanks everyone for the advice and suggestions so far!

–  
R.Livsey

> **[Livsey.org](http://livsey.org)**
>
> I’ve been using Firebase with Ember.js quite a lot recently and have just
> released Fireplace, a library to integrate the two more easily. It

---

<div class="post-metadata">

**Author:** ![rjlyders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@rjlyders](https://www.ruby-forum.com/u/rjlyders)\
**Post date:** [April 13, 2006, 5:49am UTC](https://www.ruby-forum.com/t/500-server-error-stumping-me-at-the-moment/57670/8 "2006-04-13T05:49:32Z")

</div>

Richard L. wrote:

> script/server runs without a hitch and the site runs through port 3000  
> (albeit slowly!), so it’s definitely something non rails related - ie  
> fcgi.
> 
> When I set cgi as opposed to fcgi in the htaccess I still get the same  
> error.
> 
> Trying to run dispatch.rb and dispatch.cgi from the command line result  
> in the same error as the fcgi one:

Hi Richard:

I have same issue, do you checked your development/production.log?

I found this:

/home/jcm/apps/lib/gems/1.8/gems/actionpack-1.12.1/lib/action\_controller/routing.rb:488:in  
`recognition_failed' /home/jcm/apps/lib/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:478:in `recognize!’  
/home/jcm/apps/lib/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in  
`dispatch’  
./dispatch.cgi:10

No idea about it yet… working

P  
[http://wiki.onrails.com.ar](http://wiki.onrails.com.ar)

---

<div class="post-metadata">

**Author:** ![rjlyders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@rjlyders](https://www.ruby-forum.com/u/rjlyders)\
**Post date:** [April 13, 2006, 6:46am UTC](https://www.ruby-forum.com/t/500-server-error-stumping-me-at-the-moment/57670/9 "2006-04-13T06:46:17Z")

</div>

Pedro V. wrote:

> Richard L. wrote:
> 
> > script/server runs without a hitch and the site runs through port 3000  
> > (albeit slowly!), so it’s definitely something non rails related - ie  
> > fcgi.
> > 
> > When I set cgi as opposed to fcgi in the htaccess I still get the same  
> > error.
> > 
> > Trying to run dispatch.rb and dispatch.cgi from the command line result  
> > in the same error as the fcgi one:
> 
> Hi Richard:
> 
> I have same issue, do you checked your development/production.log?
> 
> I found this:
> 
> /home/jcm/apps/lib/gems/1.8/gems/actionpack-1.12.1/lib/action\_controller/routing.rb:488:in  
> `recognition_failed' /home/jcm/apps/lib/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:478:in `recognize!’  
> /home/jcm/apps/lib/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in  
> `dispatch’  
> ./dispatch.cgi:10
> 
> No idea about it yet… working
> 
> P  
> [http://wiki.onrails.com.ar](http://wiki.onrails.com.ar)

My log shows my ./dispatch.cgi run from shell.

P

[http://wiki.onrails.com.ar](http://wiki.onrails.com.ar)
