500 Server Error - stumping me at the moment


#1

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.


#2

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”


#3

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
http://livsey.org


#4

Also running webrick in debug mode can be very helpful

ruby -d scripts/server


#5

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…


#6

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 wrote:


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails


#7

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
http://livsey.org


#8

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:inrecognize!’
/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


#9

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:inrecognize!’
/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

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

P

http://wiki.onrails.com.ar