Rails startup trouble (FastCGI)


#1

After spending few frustrating hours to get my Rails app to work with FastCGI, I started browsing the Forum. The number
of people having problem with Rails/FastCGI made me wonder if I made the right choice by hosting with DreamHost.

I followed all the instructions from Dreamhost WIKI and also tried suggestions from the Forum but to no avail.

I am still getting Application Error:
“Rails application failed to start properly”

And error.log has following entries:

[Sat Mar 03 20:07:29 2007] [error] [client 66.31.153.84] FastCGI: comm with (dynamic) server “/home/jcgb/jcgb.info/ror/public/dispatch.fcgi” aborted: (first read) idle timeout (60 sec)
[Sat Mar 03 20:07:29 2007] [error] [client 66.31.153.84] FastCGI: incomplete headers (0 bytes) received from server “/home/jcgb/jcgb.info/ror/public/dispatch.fcgi”

I will greatly appreciate your help.


#2

I’m also getting this intermittently. Anyone with any idea what can be causing it?

-B…


#3

I had the same problem trying to set up typo. The problem is most likely that you’ve got dos newlines in the shebang, at least thats what it was for me. Try running dos2unix on dispatch.*. I’ve got a bit more detailed info at my blog, with a few other possible fixes.


#4

The advice on his blog to try running the dispatch.* scripts directly from the command-line is probably the most important thing to try. If you have problems with permissions or the ‘shebang’ line, or if there are syntax errors or any number of other things, you’ll know.

rodney


#5

The infamous “incomplete headers” bug. Most of the times it just happens with no apparent reason. Leave it alone for 10 minutes and try again.