From 5c42616a3a498064592159ee38e587eb30dc29e5 Mon Sep 17 00:00:00 2001 From: Dustin Pianalto Date: Mon, 14 Sep 2020 12:36:14 -0800 Subject: [PATCH] Adjust Connection Pool --- postgres/database.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/postgres/database.go b/postgres/database.go index eb94b1b..894de69 100644 --- a/postgres/database.go +++ b/postgres/database.go @@ -19,6 +19,9 @@ func ConnectDatabase(dbConnString string) { } else { 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 }