On Aug 9, 10:45 am, Steve Smith <[email protected]> wrote:
> Therefore, firstly are you forking using multiple threads or doing anything 
> that might cause the connection to be lost at the socket level?

Heroku suggested that also today. No code that I know of it forking or
threading but there might be something buried in a gem.

> Secondly as a bodge, what about attempting to make sure the connection exists 
> before running the command and if not reconnecting? 
> (ActiveRecord::Base.establish_connection).

I just implemented this to give it a whirl. The code I am using is:

http://pastie.org/1082967

Hopefully this will work around the issue.

> Finally I'm sure you have already tried this so it's not really a solution 
> but do you have the latest version of the PG gem just in case it's something 
> in there?

Yes all gems, Rails are latest stable version and running on the
Bamboo stack.

Thanks for your advice. Hopefully the reconnect at the start of the
request workaround will get me working again.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" 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/heroku?hl=en.

Reply via email to