Skip to content

Commit

Permalink
fix(pubsublite): increase default timeouts for publish and subscribe …
Browse files Browse the repository at this point in the history
…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 df28999
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pubsublite/internal/wire/settings.go
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions pubsublite/pscompat/settings.go
Expand Up @@ -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,
}

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit df28999

Please sign in to comment.