From b724ebf0339474446fb6f8a807084763f13ae634 Mon Sep 17 00:00:00 2001 From: iamhujiebin <458249864@qq.com> Date: Mon, 24 Jul 2023 23:08:06 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E4=B8=B4=E6=97=B6=E7=BB=99hilo-gr?= =?UTF-8?q?oup=E5=BC=80500=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/mysql/mysql.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resource/mysql/mysql.go b/resource/mysql/mysql.go index 2dda38e..b1bb3c0 100644 --- a/resource/mysql/mysql.go +++ b/resource/mysql/mysql.go @@ -51,8 +51,8 @@ func init() { if d, err := Db.DB(); err == nil { d.SetConnMaxLifetime(time.Minute * 30) // 连接可复用的最大时间。 - d.SetMaxIdleConns(300) // 空闲连接数 - d.SetMaxOpenConns(300) // 最大连接数 + d.SetMaxIdleConns(500) // 空闲连接数 + d.SetMaxOpenConns(500) // 最大连接数 if err := d.Ping(); err != nil { fmt.Printf("database ping error %v", err) } -- 2.22.0