# Broken Pipe to Postgres

**URL:** <https://www.ruby-forum.com/t/broken-pipe-to-postgres/114875>\
**Category:** Rails\
**Created:** [September 18, 2007, 1:33pm UTC](https://www.ruby-forum.com/t/broken-pipe-to-postgres/114875 "2007-09-18T13:33:41Z")\
**Posts on this page:** 3\
**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:** [September 18, 2007, 1:33pm UTC](https://www.ruby-forum.com/t/broken-pipe-to-postgres/114875/1 "2007-09-18T13:33:41Z")

</div>

Hi all,

My app was running fine for months, then all of a sudden I keep getting  
the following in my production.log, 3 times over the last week, which  
kills the app dead until httpd is restarted (on Fedora Core):

Processing Base#index (for xxx.xx.xx.xxx at 2007-09-18 07:44:55) [GET]  
Session ID: c37adab9fab32e2ac05d6ea83e74a42e  
Parameters: {}

Errno::EPIPE (Broken pipe):  
/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:86:in  
`write' /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:86: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/eco-motors.co.uk/rails/ecomotors/public/dispatch.fcgi:24

Any thoughts?

---

<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:** [September 18, 2007, 5:26pm UTC](https://www.ruby-forum.com/t/broken-pipe-to-postgres/114875/2 "2007-09-18T17:26:42Z")

</div>

On Tue, 18 Sep 2007 13:33:41 +0200, Mark Fendley wrote:

> My app was running fine for months, then all of a sudden I keep getting  
> the following in my production.log, 3 times over the last week, which  
> kills the app dead until httpd is restarted (on Fedora Core):

I don’t know the answer to your problem, but: is running edge an option?  
There were a whole bunch of Postgres fixes checked in last month; it  
might  
be worth at least seeing if it solves the issue. (Of course, if it’s  
that  
intermittent, it’d be hard to know if it’s solved or not.)

–  
Jay L. |  
Boston, MA | My character doesn’t like it when they  
Faster: jay at jay dot fm | cry or shout or hit.  
[http://www.jay.fm](http://www.jay.fm) | - Kristoffer

---

<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:** [June 22, 2008, 8:10pm UTC](https://www.ruby-forum.com/t/broken-pipe-to-postgres/114875/3 "2008-06-22T20:10:07Z")

</div>

HELLO , DID YOU SOLVE THIS PROBLEM ???

WHY THIS ERROR ?

IM WORKING WITH RAILS 2.0 AND POSTGRES 8.3

THIS IS THE RAILS LOG:

Errno::EPIPE

Broken pipe

RAILS\_ROOT: /var/BackupIvan/pdf3  
Application Trace | Framework Trace | Full Trace

/var/lib/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:86:in  
`write' /var/lib/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:86:in`\<\<’  
/var/lib/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:86:in  
`query' /var/lib/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/postgres-compat.rb:33:in`query’  
/var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/connection\_adapters/postgresql\_adapter.rb:246:in  
`active?' /var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:108:in`verify!’  
/var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/connection\_adapters/abstract/connection\_specification.rb:122:in  
`verify_active_connections!' /var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:121:in`each\_value’  
/var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/connection\_adapters/abstract/connection\_specification.rb:121:in  
`verify_active_connections!' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb:76:in`process’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb:74:in  
`synchronize' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb:74:in`process’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:159:in  
`process_client' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:158:in`each’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:158:in  
`process_client' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in`run’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `initialize' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in`new’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in`initialize’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `new' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in`run’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:282:in  
`run' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:281:in`each’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:281:in  
`run' /var/lib/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:128:in`run’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/command.rb:212:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:281 /var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in`load’  
/var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/dependencies.rb:489:in  
`load' /var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in`new\_constants\_in’  
/var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/dependencies.rb:489:in  
`load' /var/lib/gems/1.8/gems/rails-2.0.2/lib/commands/servers/mongrel.rb:64 /var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in`require’  
/var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/dependencies.rb:342:in  
`new_constants_in' /var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in`require’  
/var/lib/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39

/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action\_controller/dispatcher.rb:146:in  
`prepare_application' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:178:in`send!’  
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action\_controller/dispatcher.rb:178:in  
`run_callbacks' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:175:in`each’  
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action\_controller/dispatcher.rb:175:in  
`send!' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:175:in`run\_callbacks’  
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action\_controller/dispatcher.rb:114:in  
`dispatch' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in`dispatch\_cgi’  
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action\_controller/dispatcher.rb:9:in  
`dispatch' /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in`gem\_original\_require’  
/usr/lib/ruby/1.8/rubygems/custom\_require.rb:27:in `require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in`gem\_original\_require’  
/usr/lib/ruby/1.8/rubygems/custom\_require.rb:27:in `require’  
script/server:3

/var/lib/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:86:in  
`write' /var/lib/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:86:in`\<\<’  
/var/lib/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:86:in  
`query' /var/lib/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/postgres-compat.rb:33:in`query’  
/var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/connection\_adapters/postgresql\_adapter.rb:246:in  
`active?' /var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:108:in`verify!’  
/var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/connection\_adapters/abstract/connection\_specification.rb:122:in  
`verify_active_connections!' /var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:121:in`each\_value’  
/var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active\_record/connection\_adapters/abstract/connection\_specification.rb:121:in  
`verify_active_connections!' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:146:in`prepare\_application’  
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action\_controller/dispatcher.rb:178:in  
`send!' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:178:in`run\_callbacks’  
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action\_controller/dispatcher.rb:175:in  
`each' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:175:in`send!’  
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action\_controller/dispatcher.rb:175:in  
`run_callbacks' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:114:in`dispatch’  
/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action\_controller/dispatcher.rb:126:in  
`dispatch_cgi' /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in`dispatch’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb:76:in  
`process' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb:74:in`synchronize’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/rails.rb:74:in  
`process' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:159:in`process\_client’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:158:in `each' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:158:in`process\_client’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in`initialize’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in `new' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:285:in`run’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `initialize' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in`new’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel.rb:268:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:282:in`run’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:281:in  
`each' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/configurator.rb:281:in`run’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/bin/mongrel\_rails:128:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.4/lib/mongrel/command.rb:212:in`run’  
/var/lib/gems/1.8/gems/mongrel-1.1.4/bin/mongrel\_rails:281  
/var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/dependencies.rb:489:in  
`load' /var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in`load’  
/var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/dependencies.rb:342:in  
`new_constants_in' /var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in`load’  
/var/lib/gems/1.8/gems/rails-2.0.2/lib/commands/servers/mongrel.rb:64  
/usr/lib/ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in`require’  
/var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/dependencies.rb:496:in  
`require' /var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in`new\_constants\_in’  
/var/lib/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/dependencies.rb:496:in  
`require' /var/lib/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39 /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in`gem\_original\_require’  
/usr/lib/ruby/1.8/rubygems/custom\_require.rb:27:in `require’  
script/server:3
