Apache2 with dispatch.fcgi randomly gives Internal Server Error for RoR 1.2.3 application

I’m working on a Ruby on Rails application that is hosted in an
environment that supports Apache2 calling dispatch.fcgi. The weird
part is that it works about 99.5% of the time but on rare seemingly
random occasions I get internal server errors. This happens in both
development and production. There is nothing added in production or
development logs when this happens.

The Apache error log has a few hopefully minor issues:
[Thu Oct 18 10:49:32 2007] [error] [client NNN.NNN.NNN.NNN] FastCGI:
server “/var/www/sites/myapp/cgi/public/dispatch.fcgi” stderr:
DEPRECATION WARNING: You called render(‘shared/list’), which is a
deprecated API call. Instead you use render :file => shared/list.
Calling render with just a string will be removed from Rails 2.0. See
http://www.rubyonrails.org/deprecation for details. (called from
render_without_benchmark at
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/layout.rb:247),
referer: https://myapp.domain.com/foobar/list

[Thu Oct 18 10:49:32 2007] [error] [client NNN.NNN.NNN.NNN] FastCGI:
server “/var/www/sites/myapp/cgi/public/dispatch.fcgi” stderr:
DEPRECATION WARNING: @params is deprecated! Call params.merge instead
of @params.merge. Args: [{:sort_order=>{“1”=>“ASC”},
:sort_association=>{“1”=>“foobar”}, :sort_priority=>{“1”=>“1”},
:sort_key=>{“1”=>“id”}}] See http://www.rubyonrails.org/deprecation
for details. (called from sort_link at
…/config/…/app/helpers/sort_helper.rb:182), referer:
https://myapp.domain.com/foobar/list
[Note: this one is weird since I am using params.merge and not
@params.merge]

[Thu Oct 18 10:49:33 2007] [error] [client NNN.NNN.NNN.NNN] FastCGI:
server “/var/www/sites/myapp/cgi/public/dispatch.fcgi” stderr:
DEPRECATION WARNING: You’ve called image_path with a source that
doesn’t include an extension. In Rails 2.0, that will not result in
.png automatically being appended. So you should call
image_path(’/images/downarrow.png’) instead See
http://www.rubyonrails.org/deprecation for details. (called from
image_tag at
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/asset_tag_helper.rb:188),
referer: https://myapp.domain.com/foobar/list
[Note: this seems weird since I’d expect actionpack to be fairly hip
to deprecations]

[Thu Oct 18 10:49:33 2007] [error] [client NNN.NNN.NNN.NNN] FastCGI:
server “/var/www/sites/myapp/cgi/public/dispatch.fcgi” stderr:
DEPRECATION WARNING: start_form_tag is deprecated and will be removed
from Rails 2.0 (use form_tag instead) See
http://www.rubyonrails.org/deprecation for details. (called from
_run_rhtml_47app47views47shared47_contenthead46rhtml at
…/config/…/app/views/shared/_contenthead.rhtml:10), referer:
https://myapp.domain.com/foobar/list

[Thu Oct 18 10:49:33 2007] [error] [client NNN.NNN.NNN.NNN] FastCGI:
server “/var/www/sites/myapp/cgi/public/dispatch.fcgi” stderr:
DEPRECATION WARNING: end_form_tag is deprecated and will be removed
from Rails 2.0 See http://www.rubyonrails.org/deprecation for
details. (called from
_run_rhtml_47app47views47shared47_contentfoot46rhtml at
…/config/…/app/views/shared/_contentfoot.rhtml:47), referer:
https://myapp.domain.com/foobar/list
[Note: the last two are legit but I wouldn’t think fatal]

in the fastcgi.crash.log I do see a number of:
[18/Oct/2007:14:32:44 :: 13033] starting
[18/Oct/2007:14:35:09 :: 13033] asked to terminate immediately
[18/Oct/2007:14:35:09 :: 13033] terminated by explicit exit
that roughly correspond to the times of the failures.

Ruby is:
$ ruby --version
ruby 1.8.4 (2005-12-24) [i486-linux]

My gem list is:
$ gem list

*** LOCAL GEMS ***

actionmailer (1.3.3)
Service layer for easy email delivery and testing.

actionpack (1.13.3)
Web-flow and rendering framework putting the VC in MVC.

actionwebservice (1.2.3)
Web service support for Action Pack.

activerecord (1.15.3)
Implements the ActiveRecord pattern for ORM.

activeresource (0.9.0)
Think Active Record for web resources.

activesupport (1.4.2)
Support and utility classes used by the Rails framework.

cgi_multipart_eof_fix (2.1)
Fix an exploitable bug in CGI multipart parsing which affects Ruby
<= 1.8.5 when multipart boundary attribute contains a non-halting
regular expression string.

daemons (1.0.5)
A toolkit to create and control daemons in different ways

fastthread (0.6.4.1)
Optimized replacement for thread.rb primitives

flexmock (0.5.0)
Simple and Flexible Mock Objects for Testing

gem_plugin (0.2.2)
A plugin system based only on rubygems that uses dependencies only

mocha (0.3.2)
Mocking and stubbing library

mongrel (1.0.1)
A small fast HTTP library and server that runs Rails, Camping, Nitro
and Iowa apps.

rails (1.2.3)
Web-application framework with template engine, control-flow layer,
and ORM.

rake (0.7.2)
Ruby based make-like utility.

sources (0.0.1)
This package provides download sources for remote gem installation

tzinfo (0.3.3)
Daylight-savings aware timezone library

I’d definitely appreciate any clues as to what’s up and how to fix it.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs