Skip to content
Snippets Groups Projects
Unverified Commit 28c27efe authored by Trung Minh Lai's avatar Trung Minh Lai Committed by GitHub
Browse files

Handle retry connect to Postgres when ping return EOF error. (#2339)


* Handle retry connect to Postgres when ping return EOF error.
* Update pkg/cluster/database.go

Co-authored-by: default avatarFelix Kunde <felix-kunde@gmx.de>

---------

Co-authored-by: default avatarTrung Minh Lai <trung.lai@hitachivantara.com>
Co-authored-by: default avatarFelix Kunde <felix-kunde@gmx.de>
parent ccc74ae9
Branches
Tags
No related merge requests found
......@@ -154,7 +154,9 @@ func (c *Cluster) initDbConnWithName(dbname string) error {
return false, err2
}
return false, err
// Retry open connection until succeeded.
c.logger.Warningf("could not connect to Postgres database: %v", err)
return false, nil
})
if finalerr != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment