From e86b26cc0bc5e08b13aff6d4180f13d6513803fb Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 22 Aug 2023 15:43:50 +0800 Subject: [PATCH] fix --- initalize/mysql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/initalize/mysql.go b/initalize/mysql.go index de559f3b..fbdfd895 100644 --- a/initalize/mysql.go +++ b/initalize/mysql.go @@ -36,7 +36,7 @@ func InitMysql(sourceMysql string) *gorm.DB { sqlDB.SetMaxIdleConns(4) // SetMaxOpenConns 设置打开数据库连接的最大数量。 - sqlDB.SetMaxOpenConns(25) + sqlDB.SetMaxOpenConns(10) // SetConnMaxLifetime 设置了连接可复用的最大时间。 sqlDB.SetConnMaxLifetime(time.Minute * 20)