You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Db reconnection is done after db.Exec Failure by the db lib,
when encountering db.Ping error, go-policyd respond DUNNO to avoid mail rejection due to database connection issue.
Connection is usualy lost when mariadb is upgraded and/or restarted.
dberr := db.Ping()
if dberr != nil {
xlog.Err("Skipping policyVerify db.Ping Error: " + dberr.Error())
// Ref : https://github.com/go-sql-driver/mysql/issues/921
db.Exec("SELECT NOW()") // Generate an error for db recovery
return "DUNNO" // always return DUNNO on error
}
I found go-policyd while searching for how to handle "unexpected read from socket" error with go-mysql-driver.
I found "unexpected read from socket" in go-policyd's RREADME.md.
I'd like to ask you how you debug this error at that time, thank you.
The text was updated successfully, but these errors were encountered: