mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
* Expose db.SetMaxOpenConns and allow other dbs to set their connection params * Add note about port exhaustion Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user