Hey all,
I was getting some similar crashes when using webbrick with high (a few
request every second or so) load so I moved up to Apache. Specifically,
I am using the “InstantRails” package with Apache/SCGI and PostgreSQL
instead of mySQL. However the same problem has sprung up again and
causes the server to spawn hundreds of separate ruby.exe processes. Is
the below stack trace meaningful to anyone? I don’t think this is a
problem with my app, it looks like a crash in the postgres module.
Thoughts?
Thanks,
Jeff
Production.log paste:
Processing PagesController#index (for 212.95.252.16 at 2005-12-13
09:47:10) [GET]
Parameters: {“action”=>“index”, “controller”=>“pages”}
Errno::EINVAL (Invalid argument):
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:86:in
`write’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:86:in
`<<’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:86:in
`query’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/postgres-compat.rb:33:in
`query’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.1.3279/lib/active_record/connection_adapters/postgresql_adapter.rb:63:in
`active?’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.1.3279/lib/active_record/connection_adapters/abstract/connection_specification.rb:103:in
`retrieve_connection’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.1.3279/lib/active_record/connection_adapters/abstract/connection_specification.rb:20:in
`connection’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.1.3279/lib/active_record/base.rb:931:in
`add_limit!’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.1.3279/lib/active_record/base.rb:924:in
`construct_finder_sql’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.1.3279/lib/active_record/base.rb:395:in
find' /app/models/article.rb:6:in
find_most_recent’
/app/controllers/pages_controller.rb:6:in `index’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/base.rb:853:in
`send’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/base.rb:853:in
`perform_action_without_filters’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/filters.rb:332:in
`perform_action_without_benchmark’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/benchmarking.rb:69:in
`measure’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/rescue.rb:82:in
`perform_action’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/base.rb:369:in
`send’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/base.rb:369:in
`process_without_session_management_support’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/session_management.rb:116:in
`process’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/rails-0.14.4.3279/lib/dispatcher.rb:38:in
dispatch' C:/ruby/irails/ruby/bin/scgi_service:23:in
process_request’
C:/ruby/irails/ruby/bin/scgi_service:21:in synchronize' C:/ruby/irails/ruby/bin/scgi_service:21:in
process_request’
C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:291:in
read_header' C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:253:in
handle_client’
C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:234:in
initialize' C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:234:in
new’
C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:234:in
handle_client' C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:188:in
listen’
C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:186:in
initialize' C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:186:in
new’
C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:186:in listen' C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:412:in
run’
C:/ruby/irails/ruby/bin/scgi_service:61
Processing PagesController#index (for 70.108.248.226 at 2005-12-13
09:47:28) [GET]
Parameters: {“action”=>“index”, “controller”=>“pages”}
Errno::EINVAL (Invalid argument):
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:86:in
`write’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:86:in
`<<’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:86:in
`query’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/postgres-compat.rb:33:in
`query’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.1.3279/lib/active_record/connection_adapters/postgresql_adapter.rb:63:in
`active?’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.1.3279/lib/active_record/connection_adapters/abstract/connection_specification.rb:103:in
`retrieve_connection’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.1.3279/lib/active_record/connection_adapters/abstract/connection_specification.rb:20:in
`connection’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.1.3279/lib/active_record/base.rb:931:in
`add_limit!’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.1.3279/lib/active_record/base.rb:924:in
`construct_finder_sql’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.1.3279/lib/active_record/base.rb:395:in
find' /app/models/article.rb:6:in
find_most_recent’
/app/controllers/pages_controller.rb:6:in `index’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/base.rb:853:in
`send’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/base.rb:853:in
`perform_action_without_filters’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/filters.rb:332:in
`perform_action_without_benchmark’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/benchmarking.rb:69:in
`measure’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/rescue.rb:82:in
`perform_action’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/base.rb:369:in
`send’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/base.rb:369:in
`process_without_session_management_support’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.1.3279/lib/action_controller/session_management.rb:116:in
`process’
C:/ruby/irails/ruby/lib/ruby/gems/1.8/gems/rails-0.14.4.3279/lib/dispatcher.rb:38:in
dispatch' C:/ruby/irails/ruby/bin/scgi_service:23:in
process_request’
C:/ruby/irails/ruby/bin/scgi_service:21:in synchronize' C:/ruby/irails/ruby/bin/scgi_service:21:in
process_request’
C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:291:in
read_header' C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:253:in
handle_client’
C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:234:in
initialize' C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:234:in
new’
C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:234:in
handle_client' C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:188:in
listen’
C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:186:in
initialize' C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:186:in
new’
C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:186:in listen' C:/ruby/irails/ruby/lib/ruby/site_ruby/1.8/scgi.rb:412:in
run’
C:/ruby/irails/ruby/bin/scgi_service:61