a potential "cheap" fix for this would be to do something like:
err := st.session.Ping() if err != nil { // failed to talk to the database, try refreshing our connection st.session.Refresh() } return st.session.DB(jujuDB).C(txnLogC)
It might even be reasonable to do a Refresh more often, as if the txnlog watcher is restarting, we probably have reason to suspect the connection.
a potential "cheap" fix for this would be to do something like:
err := st.session.Ping() Refresh( ) DB(jujuDB) .C(txnLogC)
if err != nil {
// failed to talk to the database, try refreshing our connection
st.session.
}
return st.session.
It might even be reasonable to do a Refresh more often, as if the txnlog watcher is restarting, we probably have reason to suspect the connection.