My app runs fine on webrick, but I get a
ActiveRecord::ConnectionNotEstablished when I try to run it on
lighttpd. Here’s the app’s lighttpd config:
$HTTP[“host”] =~ “(www.)?mysite.com” {
server.document-root = “/home/pergesuteore/public/”
server.error-handler-404 = “/dispatch.fcgi”
fastcgi.server = ( “.fcgi” =>
( “localhost” =>
(
“socket” => “/var/lighttpd/teore.socket”,
“bin-path” => “/home/pergesu/teore/public/dispatch.fcgi”,
“bin-environment” => ( “RAILS_ENV” => “production” ),
“min-procs” => 5,
“max-procs” => 5,
“idle-timeout” => 60
)
)
)
}
One thing I’ve noticed is that the socket files are named
teore.socket-0=, teore.socket-1=, etc, whereas on my dev machine
they’re just teore.socket-0. Not sure if perhaps the = is a file type
designator on linux or something, but that’s my first suspicion as to
what the problem is. Anyone have a clue what’s going on? Actually
now I’m pretty sure it’s just some designator thing.
Also, when I do script/console it connects fine, so I’m pretty sure
the ConnectionNotEstablished error is something to do with the fastcgi
connection.
Here’s the full error
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:111:in
retrieve_connection' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:20:in
connection’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:734:in
columns' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1663:in
attributes_from_column_definition’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1185:in
initialize_without_callbacks' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/callbacks.rb:236:in
initialize’
#{RAILS_ROOT}/app/controllers/user_controller.rb:67:in generate_blank' #{RAILS_ROOT}/app/controllers/user_controller.rb:3:in
login’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:in
perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/filters.rb:332:in
perform_action_without_benchmark’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in
perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in
measure’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in
perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/rescue.rb:82:in
perform_action’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:369:in
process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/session_management.rb:116:in
process’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in
dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:141:in
process_request’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:53:in
process!' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:600:in
each_cgi’
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in each_cgi' /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in
process!’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in
`process!’
/home/kebp/teore/public/dispatch.fcgi:24