Apache2 + mod_fcgid + Rails

Paul Brown @ 2006-11-05T20:39:46Z

With a default Typo configuration running on lighttpd, it was producing more output in the error log than in the access log with something about "missing cleanup", so I finally got around to migrating over to apache2 and mod_fcgid. (The short-term solution was a couple of cron jobs to keep the lighttpd process up.) The usual configuration work (see, e.g., James Duncan Davidson's write-up) was a dead-end, but turning up the logging verbosity on the apache2 instance had the solution:

[Sun Nov 05 18:13:19 2006] [info] mod_fcgid: read data timeout in 5 seconds

Initialization for one of the processes takes way longer than that, so putting some more sane values into the mod_fcgid configuration along the lines of what Spencer Miles used was the solution. At least so far, the apache2 and mod_fcgid combination is much snappier and more stable than the lighttpd configuration.

Meta

Tags: (tag) (tag) (tag) (tag) (tag) (tag)

(comment bubbles) 2 comments
1326 direct views

Comment from Tom Copeland @ 2006-11-06T15:39:48Z # permalink

I just upgraded my various Rails apps (http://getindi.com among others) from Apache 1.3 and fcgi to Apache 2.2, mod_proxy, and mongrel. It's a much simpler configuration, and for some reason it just feels less fragile. Nice to be up on the latest Apache, too...

Comment from Paul Brown @ 2006-11-06T18:12:38Z # permalink

@Tom: I was tempted by Mongrel but don't have any real experience with it. Also, I didn't feel like writing the rc.d and init.d magic to get it started at boot time. Any ups or downs versus FastCGI? The startup time is the only obvious negative with the fcgid configuration.