diff options
-rw-r--r-- | gogs.go | 2 | ||||
-rw-r--r-- | models/models.go | 6 | ||||
-rw-r--r-- | templates/.VERSION | 2 |
3 files changed, 8 insertions, 2 deletions
@@ -16,7 +16,7 @@ import ( "github.com/gogs/gogs/pkg/setting" ) -const APP_VER = "0.11.86.0130" +const APP_VER = "0.11.87.0206" func init() { setting.AppVer = APP_VER diff --git a/models/models.go b/models/models.go index c4b60a0e..4cc6f8c6 100644 --- a/models/models.go +++ b/models/models.go @@ -13,6 +13,7 @@ import ( "os" "path" "strings" + "time" "github.com/Unknwon/com" _ "github.com/denisenkom/go-mssqldb" @@ -200,6 +201,11 @@ func SetEngine() (err error) { return fmt.Errorf("Fail to create 'xorm.log': %v", err) } + // To prevent mystery "MySQL: invalid connection" error, + // see https://github.com/gogs/gogs/issues/5532. + x.SetMaxIdleConns(0) + x.SetConnMaxLifetime(time.Second) + if setting.ProdMode { x.SetLogger(xorm.NewSimpleLogger3(logger, xorm.DEFAULT_LOG_PREFIX, xorm.DEFAULT_LOG_FLAG, core.LOG_WARNING)) } else { diff --git a/templates/.VERSION b/templates/.VERSION index ec515cf5..1ee92a3b 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.11.86.0130 +0.11.87.0206 |