I use this Rack middleware to make sure HTTP requests don't get a dead database connection:
http://pastie.org/private/sn73uvvr4vzm1z7x4pcsdg Pretty useful in normal web applications. On Wednesday, November 30, 2011 10:49:20 AM UTC+1, Alexey Ilyichev wrote: > > Hi. > > We use Sequel with jruby and postgresql. The thing is when we restart > the db server, sequel raises an exception saying that connection has > died. What I would like to do is to reconnect to DB and repeat the > query in this situation. And sure I wouldn't like to repeat this logic > all over the project. Any ideas how to do it? > > Thanks in advance! > > -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/sequel-talk/-/b-ZiZxLAjPoJ. 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/sequel-talk?hl=en.
