mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-29 21:54:13 +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"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/goharbor/harbor/src/common/utils"
|
"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.
|
// and https://github.com/astaxie/beego/issues/4059 for more info.
|
||||||
db, _ := orm.GetDB(an)
|
db, _ := orm.GetDB(an)
|
||||||
db.SetMaxOpenConns(p.maxOpenConns)
|
db.SetMaxOpenConns(p.maxOpenConns)
|
||||||
|
db.SetConnMaxLifetime(5 * time.Minute)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user