From df28999076fa91939038c06a706fc63811b20932 Mon Sep 17 00:00:00 2001 From: tmdiep Date: Tue, 16 Mar 2021 14:46:09 +1100 Subject: [PATCH] fix(pubsublite): increase default timeouts for publish and subscribe stream connections (#3821) Increases the default timeout from 1 min to 1 hr. --- pubsublite/internal/wire/settings.go | 4 ++-- pubsublite/pscompat/settings.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pubsublite/internal/wire/settings.go b/pubsublite/internal/wire/settings.go index d4f97bf63fb..6bfe7dc3b11 100644 --- a/pubsublite/internal/wire/settings.go +++ b/pubsublite/internal/wire/settings.go @@ -82,7 +82,7 @@ var DefaultPublishSettings = PublishSettings{ DelayThreshold: 10 * time.Millisecond, CountThreshold: 100, ByteThreshold: 1e6, - Timeout: 10 * time.Minute, + Timeout: 60 * time.Minute, // By default set to a high limit that is not likely to occur, but prevents // OOM errors in clients. BufferedByteLimit: 1 << 30, // 1 GiB @@ -146,7 +146,7 @@ type ReceiveSettings struct { var DefaultReceiveSettings = ReceiveSettings{ MaxOutstandingMessages: 1000, MaxOutstandingBytes: 1e9, - Timeout: 10 * time.Minute, + Timeout: 60 * time.Minute, } func validateReceiveSettings(settings ReceiveSettings) error { diff --git a/pubsublite/pscompat/settings.go b/pubsublite/pscompat/settings.go index ea4fdd40f9a..cb05b0a276a 100644 --- a/pubsublite/pscompat/settings.go +++ b/pubsublite/pscompat/settings.go @@ -106,7 +106,7 @@ var DefaultPublishSettings = PublishSettings{ DelayThreshold: 10 * time.Millisecond, CountThreshold: 100, ByteThreshold: 1e6, - Timeout: 60 * time.Second, + Timeout: 60 * time.Minute, BufferedByteLimit: 1e8, } @@ -206,7 +206,7 @@ type ReceiveSettings struct { var DefaultReceiveSettings = ReceiveSettings{ MaxOutstandingMessages: 1000, MaxOutstandingBytes: 1e9, - Timeout: 60 * time.Second, + Timeout: 60 * time.Minute, } func (s *ReceiveSettings) toWireSettings() wire.ReceiveSettings {