Forum: Ruby on Rails Apache not running Fcgid

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.
Matthew F. (Guest)
on 2006-03-12 02:31
(Received via mailing list)
I'm having the same problems as this fellow, Mr. Cheetham, in getting
my rails app up and running on apache2+fcgid.  Webrick runs, but
dispatch.fcgi never actually runs, and apache spits out a grusome
"Premature end of script headers: dispatch.cgi" error message in the
log.  Mr. Cheetham describes his problem at
http://www.archivesat.com/Typo_blogging_engine/thr...

I can safely say dispatch.fcgi is not actually running because, like
mr. Cheetham, I modified my dispatch.fcgi to spit out some foo into
/tmp as soon as it is run.  Foo is not being spat.

Manually running dispatch.fcgi gives me a 500 error and spits out some
foo to /tmp.

Please assist, I've been going completely bonkers over this.  There's
nothing in rails_root/log, no useful info from apache..... I want my 8
hours back.   I want this working.  :/

Thanks-a-many,
Rektide
Roland (Guest)
on 2006-03-12 02:54
In dispatch.fcgi the top line should have something like this:

#!/usr/bin/ruby


In a terminal decide where ruby is located by:

which ruby

and put the path after the exlamation mark. This is it in terms of rails
configuration.

You might need other libraries related to fcgi to make this run. What
distro/os do you run?
Matthew F. (Guest)
on 2006-03-12 03:08
(Received via mailing list)
I'm on RH/Fedora FC2.  I compiled ruby 1.8.4, mod_fcgid, a bunch of
other stuff from source.

I've been hitting wall after wall on this deploy, I imported an older
.htaccess that was still Rewriting to the .cgi, not the .fcgi.  Now
that its trying to run the .fcgi, I'm getting some output in the
apache logs, although dispatch.fcgi is still not running.  Here's my
output:

[Sat Mar 11 20:16:07 2006] [debug] fcgid_proc_unix.c(487):
(111)Connection refused: mod_fcgid: can't connect unix domain socket:
/home/geodb/config/fcgi/28988.13
[Sat Mar 11 20:16:07 2006] [debug] fcgid_proc_unix.c(487):
(111)Connection refused: mod_fcgid: can't connect unix domain socket:
/home/geodb/config/fcgi/28988.14
[Sat Mar 11 20:16:07 2006] [info] mod_fcgid: can't apply process slot
for /home/httpd/vhosts/[host]/httpdocs/geo/dispatch.fcgi

/home/httpd/vhosts/[host]/httpdocs/geo is a softlink to /home/geodb

Again, manually running ./public/dispatch.fcgi gives me 500 error
message and actually runs dispatch.fcgi.  dispatch.fcgi doesnt seem to
be the problem, looks like it's mod_fcgid not actually starting rails
processes.

Thanks,
rektide
Matthew F. (Guest)
on 2006-03-12 03:08
(Received via mailing list)
Forgot to mention /home/geodb/config/fcgi directory is world writable,
and accessible.  Just another checkmark.  Thanks.
Anonymous (Guest)
on 2006-03-23 01:51
(Received via mailing list)
make sure that wherever in the apache config you are loading the module
you also have these fcgid IPCCommTimeout and IPCConnectTimeout options
set. example:


	LoadModule fcgid_module modules/mod_fcgid.so
	AddHandler fcgid-script .fcg
	AddHandler fcgid-script .fcgi
	IPCCommTimeout 40
	IPCConnectTimeout 10
This topic is locked and can not be replied to.