# Errno::ECONNRESET (Connection reset by peer):

**URL:** <https://www.ruby-forum.com/t/errno-econnreset-connection-reset-by-peer/122449>\
**Category:** Rails\
**Created:** [December 7, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/errno-econnreset-connection-reset-by-peer/122449 "2007-12-07T18:13:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mfaine](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b3f665/32.png) [@mfaine](https://www.ruby-forum.com/u/mfaine)\
**Post date:** [December 7, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/errno-econnreset-connection-reset-by-peer/122449/1 "2007-12-07T18:13:34Z")

</div>

Seemingly random db connection drop (FastCGI/Apache/PostgreSQL). Kills  
the app with an ‘Application Error (Rails)’

Any suggestions?

production.log as follows:

Processing Base#index (for xxx.xxx.xxx.xxx at 2007-12-07 13:39:03) [GET]  
Session ID: 4bfd0284bd7672b57e65bdb21637adb5  
Parameters: {}

Errno::ECONNRESET (Connection reset by peer):  
/usr/local/lib/ruby/1.8/readbytes.rb:16:in `read' /usr/local/lib/ruby/1.8/readbytes.rb:16:in`readbytes’  
/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/message.rb:32:in  
`read' /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:92:in`query’  
/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:91:in  
`query' /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/postgres-compat.rb:33:in`query’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active\_record/connection\_adapters/postgresql\_adapter.rb:65:in  
`active?' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract_adapter.rb:85:in`verify!’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active\_record/connection\_adapters/abstract/connection\_specification.rb:99:in  
`verify_active_connections!' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:98:in`verify\_active\_connections!’  
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:70:in  
`prepare_application' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:37:in`dispatch’  
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi\_handler.rb:150:in  
`process_request' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54: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.1.6/lib/fcgi\_handler.rb:53:in  
`process!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in`process!’  
/var/www/vhosts//rails/ecomotors/public/dispatch.fcgi:24
