libadlin: Add recommended settings to avoid db flood
This commit is contained in:
parent
7187a7d187
commit
f84f18ca01
@ -48,6 +48,10 @@ func DBInit(dsn string) (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
db.SetConnMaxLifetime(time.Minute * 5)
|
||||||
|
db.SetMaxOpenConns(20)
|
||||||
|
db.SetMaxIdleConns(10)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user