From 70688ae667ede9ad9cddf77500c05bdeba44f6f7 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Thu, 12 May 2022 10:48:25 +0530 Subject: [PATCH] fix: update default connection to 100 (#135) --- database/config.go | 2 +- database/config_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/database/config.go b/database/config.go index 536109597b..50522c5491 100644 --- a/database/config.go +++ b/database/config.go @@ -15,7 +15,7 @@ const ( var defaultConfig = &DbConfig{ MaxIdleConnections: 10, - MaxOpenConnections: 1000, + MaxOpenConnections: 100, ConnMaxLifeTime: config.Duration{Duration: time.Hour}, Postgres: PostgresConfig{ Port: 5432, diff --git a/database/config_test.go b/database/config_test.go index 74ee93b717..23fcd2b544 100644 --- a/database/config_test.go +++ b/database/config_test.go @@ -22,7 +22,7 @@ func TestParseDatabaseConfig(t *testing.T) { assert.NoError(t, accessor.UpdateConfig(context.Background())) assert.Equal(t, false, GetConfig().EnableForeignKeyConstraintWhenMigrating) - assert.Equal(t, 1000, GetConfig().MaxOpenConnections) + assert.Equal(t, 100, GetConfig().MaxOpenConnections) assert.Equal(t, 10, GetConfig().MaxIdleConnections) assert.Equal(t, config.Duration{Duration: 3600000000000}, GetConfig().ConnMaxLifeTime)