Adjust Connection Pool
This commit is contained in:
parent
6cc5e042d5
commit
5c42616a3a
@ -19,6 +19,9 @@ func ConnectDatabase(dbConnString string) {
|
|||||||
} else {
|
} else {
|
||||||
fmt.Println("Database Connected.")
|
fmt.Println("Database Connected.")
|
||||||
}
|
}
|
||||||
|
db.SetMaxOpenConns(75) // The RDS instance has a max of 75 open connections
|
||||||
|
db.SetMaxIdleConns(5)
|
||||||
|
db.SetConnMaxLifetime(300)
|
||||||
Database = db
|
Database = db
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user