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)