Skip to content
Permalink
Browse files
fix(pubsublite): increase default timeouts for publish and subscribe …
…stream connections (#3821)

Increases the default timeout from 1 min to 1 hr.
  • Loading branch information
tmdiep committed Mar 16, 2021
1 parent fd04a55 commit df28999076fa91939038c06a706fc63811b20932
Showing with 4 additions and 4 deletions.
  1. +2 −2 pubsublite/internal/wire/settings.go
  2. +2 −2 pubsublite/pscompat/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 {
@@ -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 {

0 comments on commit df28999

Please sign in to comment.