From 00e6667bc045321c0024baf3e4ba7f743dfceeea Mon Sep 17 00:00:00 2001 From: pigwin Date: Tue, 23 Dec 2025 16:44:24 +0000 Subject: [PATCH] v1.0.0 --- config/conf.json | 2 +- config/db.go | 4 ++-- main.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/conf.json b/config/conf.json index 5ce5c90..cd4db0b 100644 --- a/config/conf.json +++ b/config/conf.json @@ -10,7 +10,7 @@ "valkey": { "host": "127.0.0.1", "port": "6379", - "max_conns": 110, + "max_conns": 100, "timeout_ms": 2000, "password": "the_valkey_password" }, diff --git a/config/db.go b/config/db.go index 2197db1..b25999b 100644 --- a/config/db.go +++ b/config/db.go @@ -28,8 +28,8 @@ func ConnectToPostgreSQL() (*sql.DB, error) { } // Set connection pool settings for high concurrency - db.SetMaxOpenConns(100) // Maximum number of open connections to the database - db.SetMaxIdleConns(50) // Maximum number of connections in the idle connection pool + db.SetMaxOpenConns(50) // Maximum number of open connections to the database + db.SetMaxIdleConns(25) // Maximum number of connections in the idle connection pool db.SetConnMaxLifetime(1 * time.Hour) // Maximum amount of time a connection may be reused db.SetConnMaxIdleTime(5 * time.Minute) // Maximum amount of time a connection may be idle diff --git a/main.go b/main.go index 100d973..cdd201a 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,7 @@ import ( ) func main() { - log.Println("ti1 testing v1.X1") + log.Println("ti1 testing v1.0.0") log.Println("Starting...") // Setup the database