aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/models.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/models/models.go b/models/models.go
index 0454ec6add..854cb33b14 100644
--- a/models/models.go
+++ b/models/models.go
@@ -157,11 +157,9 @@ func SetEngine() (err error) {
// so use log file to instead print to stdout.
x.SetLogger(NewXORMLogger(setting.Database.LogSQL))
x.ShowSQL(setting.Database.LogSQL)
- if setting.Database.UseMySQL {
- x.SetMaxIdleConns(setting.Database.MaxIdleConns)
- x.SetConnMaxLifetime(setting.Database.ConnMaxLifetime)
- }
-
+ x.SetMaxOpenConns(setting.Database.MaxOpenConns)
+ x.SetMaxIdleConns(setting.Database.MaxIdleConns)
+ x.SetConnMaxLifetime(setting.Database.ConnMaxLifetime)
return nil
}