Fcgi dispatcher crashing

I’m trying to set deploy an app on apache2 with the fcgid module, but
can’t
seem to get anywhere.

Things work fine with cgi, but when i switch to fcgi, i’m stuck with a
‘503:
Service Temporarily Unavailable’. There’s no error being logged
anywhere,
afaik.

Trying to run dispatch.fcgi from the shell doesn’t work either. It bombs
out, and the following is written to ‘railsapp/log/fastcgi.crash.log’:

[07/Mar/2006:16:15:34 :: 29789] starting
[07/Mar/2006:16:15:34 :: 29789] Dispatcher failed to catch: undefined
method
is_cgi?' for FCGI:Class (NoMethodError) /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:593:in each_cgi’
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in
process!' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in process!’
./dispatch.fcgi:24
almost killed by this error
[07/Mar/2006:16:15:34 :: 29789] Dispatcher failed to catch: undefined
method
is_cgi?' for FCGI:Class (NoMethodError) /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:593:in each_cgi’
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in
process!' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in process!’
./dispatch.fcgi:24
killed by this error

Line 24 would be ‘RailsFCGIHandler.process!’.

Suggestions on what to try next?

Environment: Ruby 1.8.4 (2005-12-24) [i386-linux], rails (1.0.0), fcgi
(0.8.6.1), apache2, fcgid 1.0.8…


View this message in context:
http://www.nabble.com/fcgi-dispatcher-crashing-t1240350.html#a3282773
Sent from the RubyOnRails Users forum at Nabble.com.

Started from the shell, dispatch.cgi prints ‘Status: 500 Internal Server
Error’, while there’s no output from dispatch.fcgi.


View this message in context:
http://www.nabble.com/fcgi-dispatcher-crashing-t1240350.html#a3282844
Sent from the RubyOnRails Users forum at Nabble.com.

All,

I am looking to return Model objects [mainly for demo purposes] as Web
Services. So I defined my Web Service as follows:

class StringLengthApi < ActionWebService::API::Base
api_method :findLength, :expects => [:string], :returns =>
[PersonContact]
end

Here is the definition of my model object:

class PersonContact < ActiveRecord::Base
set_table_name “person_contact”
set_primary_key “contact_id”
has_one :user,
:class_name => “User”,
:foreign_key => “user_id”
has_one :buyer_role,
:class_name => “BuyerRole”,
:foreign_key => “buyer_id”
has_many :notes,
:class_name => “Note”,
:foreign_key => “contact_id”
has_many :tasks,
:class_name => “Task”,
:foreign_key => “contact_id”

end

What happens when the WSDL generation occurs, is that it does not
traverse my relationships at all. I have attached the generated WSDL
for example purposes.

Thanks in advance,

Ron

Kent,

That makes sense and is likely best practice any way. Although it would
be nice to proved some sort of depth indicator to say how deep into an
AR the WSDL generation should go.

Ron


From: [email protected] on behalf of Kent S.
Sent: Tue 3/7/2006 11:01 AM
To: [email protected]
Subject: Re: [Rails] Web Services WSDL Generation Question

No, AWS it doesn’t traverse activerecord associations. Mostly I think
because it’s difficult to answer the question of when to stop. In your
example, if User model object has further associations, should AWS
traverse them too?

I’d recommend you to create a AWS::Struct object for each web service
method that returns a complex data structure. This way you can manage
how much data will be transferred when it’s called.

Kent.

On 3/7/06, Ron DiFrango [email protected] wrote:

class PersonContact < ActiveRecord::Base
:foreign_key => “contact_id”
Ron


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Kent

No, AWS it doesn’t traverse activerecord associations. Mostly I think
because it’s difficult to answer the question of when to stop. In your
example, if User model object has further associations, should AWS
traverse them too?

I’d recommend you to create a AWS::Struct object for each web service
method that returns a complex data structure. This way you can manage
how much data will be transferred when it’s called.

Kent.

On 3/7/06, Ron DiFrango [email protected] wrote:

class PersonContact < ActiveRecord::Base
:foreign_key => “contact_id”
Ron


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Kent

Found a solution at the very bottom of
Peak Obsession . Seems the native fcgi
library didn’t get loaded.

Regret not trying to load the fcgid module now, but switched to fastcgi
once
i saw this, and as things seem to be working…


View this message in context:
http://www.nabble.com/fcgi-dispatcher-crashing-t1240350.html#a3298981
Sent from the RubyOnRails Users forum at Nabble.com.

On 3/7/06, Lucifron [email protected] wrote:

Started from the shell, dispatch.cgi prints ‘Status: 500 Internal Server
Error’, while there’s no output from dispatch.fcgi.

dispatch.fcgi from the shell should also give you the ‘Status: 500
Internal Server Error’ message.

Go back thru your fcgi setup and make sure you have everything setup
right.

In particular make sure you have the fcgi gem installed.

“gem list” will give you a list of your installed gems.

Greg

Greg F.
The Norcross Group
Forensics for the 21st Century