I've spent the day trying to track this down. I am not seeing it with my older rails/activerecord app, only with the newer rails 3.0.3/ sequel app.
I "think" it may be the ssl connection to postgresql. On newer Ubuntu systems a local tcp connection uses ssl by default (kind of odd but still). What I did was to remove the host,username,password settings from database.yml which forced it to use a local unix pipe to connect, so far I have not seen this error, but it is pretty infrequent. You can also switch off SSL in the posgresql,conf file., check to see if ssl is set to true in that file, or when yo connect at the command line with > psql -h localhost yourdbname if it prints out SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) then it is using SSL. Let me know. On Dec 18, 4:56 am, Tim Uckun <[email protected]> wrote: > On Sat, Dec 18, 2010 at 11:05 AM, Jim Morris <[email protected]> wrote: > > I have recently deployed a similar setup, Ubuntu 10.04, pgsql 8.4, > > rails 3.0.3, pg gem etc. > > > I have started to see this error occasionally, that request fails then > > subsequent requests are OK, the pgsql log says the client > > disconnected! > > In my case the application is unable to connect back to the database. > > > Sequel::DatabaseDisconnectError (PGError: server closed the connection > > unexpectedly > > I was thinking it might be an activerecord problem but if you are > having the same issue with sequel maybe it's at a lower level than > that. > > Somebody suggested it might be a connection pool or a thread pool > issue but I have no way of testing that. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

