Rails crashes over night?

S

Stephan

I'm running Ruby on Rails on Fedora Core 4 with lighttpd and fastcgi. I
also used the login generator (don't know if relevant). I have the
following problem: At day time I work on the server and create/modify
ruby files on the server, all pages work fine. Than the next day I want
to open de server I get the error at the end of this message (on all
pages, including non protected).

If I restart lighttpd everything works again. Any ideas on how to fix
this? This happens every day...

Thanks,

Stephan


=========================================================================================================================
NoMethodError in Test#test

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.[]

RAILS_ROOT: /home/stephan/members/public/../config/..
Application Trace | Framework Trace | Full Trace

/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connection_adapters/mysql_adapter.rb:322:in
`connect'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connection_adapters/mysql_adapter.rb:174:in
`reconnect!'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:103:in
`retrieve_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:20:in
`connection'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/benchmarking.rb:85:in
`active_record_runtime'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/benchmarking.rb:72:in
`perform_action_without_rescue'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/rescue.rb:82:in
`perform_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/base.rb:369:in
`process_without_session_management_support'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/session_management.rb:116:in
`process'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/dispatcher.rb:38:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:141:in
`process_request'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:53:in
`process!'
/usr/lib/site_ruby/1.8/fcgi.rb:600:in `each_cgi'
/usr/lib/site_ruby/1.8/fcgi.rb:117:in `session'
/usr/lib/site_ruby/1.8/fcgi.rb:104:in `each_request'
/usr/lib/site_ruby/1.8/fcgi.rb:36:in `each'
/usr/lib/site_ruby/1.8/fcgi.rb:597:in `each_cgi'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:52:in
`process!'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:22:in
`process!'
/home/stephan/members/public/dispatch.fcgi:24

/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connection_adapters/mysql_adapter.rb:322:in
`connect'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connection_adapters/mysql_adapter.rb:174:in
`reconnect!'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:103:in
`retrieve_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:20:in
`connection'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/benchmarking.rb:85:in
`active_record_runtime'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/benchmarking.rb:72:in
`perform_action_without_rescue'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/rescue.rb:82:in
`perform_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/base.rb:369:in
`process_without_session_management_support'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/session_management.rb:116:in
`process'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/dispatcher.rb:38:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:141:in
`process_request'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:53:in
`process!'
/usr/lib/site_ruby/1.8/fcgi.rb:600:in `each_cgi'
/usr/lib/site_ruby/1.8/fcgi.rb:117:in `session'
/usr/lib/site_ruby/1.8/fcgi.rb:104:in `each_request'
/usr/lib/site_ruby/1.8/fcgi.rb:36:in `each'
/usr/lib/site_ruby/1.8/fcgi.rb:597:in `each_cgi'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:52:in
`process!'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:22:in
`process!'
/home/stephan/members/public/dispatch.fcgi:24

/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connection_adapters/mysql_adapter.rb:322:in
`connect'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connection_adapters/mysql_adapter.rb:174:in
`reconnect!'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:103:in
`retrieve_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:20:in
`connection'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/benchmarking.rb:85:in
`active_record_runtime'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/benchmarking.rb:72:in
`perform_action_without_rescue'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/rescue.rb:82:in
`perform_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/base.rb:369:in
`process_without_session_management_support'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/session_management.rb:116:in
`process'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/dispatcher.rb:38:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:141:in
`process_request'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:53:in
`process!'
/usr/lib/site_ruby/1.8/fcgi.rb:600:in `each_cgi'
/usr/lib/site_ruby/1.8/fcgi.rb:117:in `session'
/usr/lib/site_ruby/1.8/fcgi.rb:104:in `each_request'
/usr/lib/site_ruby/1.8/fcgi.rb:36:in `each'
/usr/lib/site_ruby/1.8/fcgi.rb:597:in `each_cgi'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:52:in
`process!'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:22:in
`process!'
/home/stephan/members/public/dispatch.fcgi:24

Request

Parameters: None

Show session dump

:return_to: /teamuser/list
flash: !map:ActionController::Flash::FlashHash {}


Response
Headers: {"Status"=>"200 OK", "cookie"=>[], "Cache-Control"=>"no-cache"}
=========================================================================================================================
 
T

tsumeruby

http://lists.rubyonrails.org/mailman/listinfo/rails

Tsume

I'm running Ruby on Rails on Fedora Core 4 with lighttpd and fastcgi. I
also used the login generator (don't know if relevant). I have the
following problem: At day time I work on the server and create/modify
ruby files on the server, all pages work fine. Than the next day I want
to open de server I get the error at the end of this message (on all
pages, including non protected).

If I restart lighttpd everything works again. Any ideas on how to fix
this? This happens every day...

Thanks,

Stephan


===========================================================================
============================================== NoMethodError in Test#test

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.[]

RAILS_ROOT: /home/stephan/members/public/../config/..
Application Trace | Framework Trace | Full Trace

/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connectio
n_adapters/mysql_adapter.rb:322:in `connect'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connectio
n_adapters/mysql_adapter.rb:174:in `reconnect!'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connectio
n_adapters/abstract/connection_specification.rb:103:in `retrieve_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connectio
n_adapters/abstract/connection_specification.rb:20:in `connection'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/benchma
rking.rb:85:in `active_record_runtime'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/benchma
rking.rb:72:in `perform_action_without_rescue'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/rescue.
rb:82:in `perform_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/base.rb
:369:in `process_without_session_management_support'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/session
_management.rb:116:in `process'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/dispatcher.rb:38:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:141:in
`process_request'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:53:in
`process!'
/usr/lib/site_ruby/1.8/fcgi.rb:600:in `each_cgi'
/usr/lib/site_ruby/1.8/fcgi.rb:117:in `session'
/usr/lib/site_ruby/1.8/fcgi.rb:104:in `each_request'
/usr/lib/site_ruby/1.8/fcgi.rb:36:in `each'
/usr/lib/site_ruby/1.8/fcgi.rb:597:in `each_cgi'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:52:in
`process!'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:22:in
`process!'
/home/stephan/members/public/dispatch.fcgi:24

/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connectio
n_adapters/mysql_adapter.rb:322:in `connect'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connectio
n_adapters/mysql_adapter.rb:174:in `reconnect!'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connectio
n_adapters/abstract/connection_specification.rb:103:in `retrieve_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connectio
n_adapters/abstract/connection_specification.rb:20:in `connection'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/benchma
rking.rb:85:in `active_record_runtime'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/benchma
rking.rb:72:in `perform_action_without_rescue'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/rescue.
rb:82:in `perform_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/base.rb
:369:in `process_without_session_management_support'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/session
_management.rb:116:in `process'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/dispatcher.rb:38:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:141:in
`process_request'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:53:in
`process!'
/usr/lib/site_ruby/1.8/fcgi.rb:600:in `each_cgi'
/usr/lib/site_ruby/1.8/fcgi.rb:117:in `session'
/usr/lib/site_ruby/1.8/fcgi.rb:104:in `each_request'
/usr/lib/site_ruby/1.8/fcgi.rb:36:in `each'
/usr/lib/site_ruby/1.8/fcgi.rb:597:in `each_cgi'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:52:in
`process!'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:22:in
`process!'
/home/stephan/members/public/dispatch.fcgi:24

/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connectio
n_adapters/mysql_adapter.rb:322:in `connect'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connectio
n_adapters/mysql_adapter.rb:174:in `reconnect!'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connectio
n_adapters/abstract/connection_specification.rb:103:in `retrieve_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/connectio
n_adapters/abstract/connection_specification.rb:20:in `connection'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/benchma
rking.rb:85:in `active_record_runtime'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/benchma
rking.rb:72:in `perform_action_without_rescue'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/rescue.
rb:82:in `perform_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/base.rb
:369:in `process_without_session_management_support'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.1/lib/action_controller/session
_management.rb:116:in `process'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/dispatcher.rb:38:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:141:in
`process_request'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:53:in
`process!'
/usr/lib/site_ruby/1.8/fcgi.rb:600:in `each_cgi'
/usr/lib/site_ruby/1.8/fcgi.rb:117:in `session'
/usr/lib/site_ruby/1.8/fcgi.rb:104:in `each_request'
/usr/lib/site_ruby/1.8/fcgi.rb:36:in `each'
/usr/lib/site_ruby/1.8/fcgi.rb:597:in `each_cgi'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:52:in
`process!'
/usr/lib/ruby/gems/1.8/gems/rails-0.14.4/lib/fcgi_handler.rb:22:in
`process!'
/home/stephan/members/public/dispatch.fcgi:24

Request

Parameters: None

Show session dump

:return_to: /teamuser/list

flash: !map:ActionController::Flash::FlashHash {}


Response
Headers: {"Status"=>"200 OK", "cookie"=>[], "Cache-Control"=>"no-cache"}
===========================================================================
==============================================
 
M

m4dc4p

I had a similar problem under Apache and FastCGI. The MySQL connection
would time out after a few hours of inactivity, but Rails would not let
go of it. The next time I tried to hit a page, I would get an error
like yours. I fixed it by increasing the MySQL timeout and by
decreasing the amount of time the FastCGI processes hang around.

Hope that helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top