mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-26 10:38:00 +01:00
Signed-off-by: Vadim Bauer <vb@container-registry.com> Co-authored-by: Vadim Bauer <vb@container-registry.com>
This commit is contained in:
parent
e5a614967d
commit
13d5e4a7de
@ -20,6 +20,7 @@ import (
|
||||
"net/url"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/orm"
|
||||
"github.com/goharbor/harbor/src/common/utils"
|
||||
@ -97,6 +98,7 @@ func (p *pgsql) Register(alias ...string) error {
|
||||
// and https://github.com/astaxie/beego/issues/4059 for more info.
|
||||
db, _ := orm.GetDB(an)
|
||||
db.SetMaxOpenConns(p.maxOpenConns)
|
||||
db.SetConnMaxLifetime(5 * time.Minute)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user