I've been developing a site using Pylons + Elixir, using the
instructions from
http://cleverdevil.org/computing/68/. For the most
part, it has been really smooth. But occasionally, I start getting
errors that end in
<class 'sqlalchemy.exceptions.InvalidRequestError'>: The transaction
is inactive due to a rollback in a subtransaction and should be
closed
I think this is because of a foreign key violation that happens in
some prior step, and that leaves the connection in the pool in a funky
state. (But that's just a guess.)
Anyway, is there a place in the pylons code (like where a connection
is returned to the pool) where i could check and see if the connection
needs to be cycled or not?