mirror of
https://github.com/goharbor/harbor
synced 2024-09-20 14:25:43 +00:00
Signed-off-by: Vadim Bauer <vb@container-registry.com> Signed-off-by: He Weiwei <hweiwei@vmware.com> Co-authored-by: Vadim Bauer <1492007+Vad1mo@users.noreply.github.com>
This commit is contained in:
parent
74ecf354cd
commit
6931d733f2
|
@ -19,6 +19,7 @@ import (
|
|||
"net/url"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/orm"
|
||||
"github.com/goharbor/harbor/src/common/models"
|
||||
|
@ -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