Forum: Ruby on Rails 500 Server Error - stumping me at the moment

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C004d67820a114e24ccf6f2ddaf5b236?d=identicon&s=25 Richard Livsey (Guest)
on 2006-04-12 22:01
(Received via mailing list)
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.
D9e2373e02d17a49738e5af1de5d2434?d=identicon&s=25 Paul (Guest)
on 2006-04-12 22:42
I had this if my models or controllers had puts in


Richard Livsey 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"
>
C004d67820a114e24ccf6f2ddaf5b236?d=identicon&s=25 Richard Livsey (Guest)
on 2006-04-12 23:05
(Received via mailing list)
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
642a55efaf21673ee542bc17e64c8ed1?d=identicon&s=25 Juan Lupión (Guest)
on 2006-04-13 01:13
(Received via mailing list)
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 Livsey <richard@livsey.org> wrote:
>
> >>
> >>
> >
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
714df4094c6cc4a71b835b5ed3668f6b?d=identicon&s=25 Todd Fisher (Guest)
on 2006-04-13 01:32
(Received via mailing list)
Also running webrick in debug mode can be very helpful

ruby -d scripts/server
Dd72ba9de6187137e032280b36169980?d=identicon&s=25 Kevin Marshall (falicon)
on 2006-04-13 01:37
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...
C004d67820a114e24ccf6f2ddaf5b236?d=identicon&s=25 Richard Livsey (Guest)
on 2006-04-13 03:03
(Received via mailing list)
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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
   <h1>Application error (Apache)</h1>
</body>
</html>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
48ae1944e6a82dffa18694663e72c931?d=identicon&s=25 Pedro Visintin (peterpunk)
on 2006-04-13 05:49
Richard Livsey 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
48ae1944e6a82dffa18694663e72c931?d=identicon&s=25 Pedro Visintin (peterpunk)
on 2006-04-13 06:46
Pedro Visintin wrote:
> Richard Livsey 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

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

P

http://wiki.onrails.com.ar
This topic is locked and can not be replied to.