Skip to content

Commit

Permalink
Modify DefaultMaxOutstandingRequestBytes to fix OOM (#1287)
Browse files Browse the repository at this point in the history
30MB for most jobs, which are allowed up to 1.5G heap.
300MB for BigQuery loads, which are allowed up to 15G heap.
  • Loading branch information
relud authored May 12, 2020
1 parent ce13aa1 commit 7454dda
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,17 +189,17 @@ Output getOutput(Env env, Executor executor) {
}));
}

// Allow almost enough outstanding elements to fill one batch per table.
// Allow enough outstanding elements to fill one batch per table.
@Override
long getDefaultMaxOutstandingElementCount() {
return 1_000_000L; // 1M messages
return 1_500_000L; // 1.5M messages
}

@Override
long getDefaultMaxOutstandingRequestBytes() {
// Allow enough bytes to reach max outstanding element count. Average bytes per element is
// expected to be a little under 200 bytes.
return getDefaultMaxOutstandingElementCount() * 200; // 200MB
return 300_000_000; // 300MB
}
},

Expand Down Expand Up @@ -314,7 +314,7 @@ long getDefaultMaxOutstandingElementCount() {

// Cases in the enum may override this method set a more appropriate default.
long getDefaultMaxOutstandingRequestBytes() {
return 100_000_000L; // 100MB
return 30_000_000L; // 30MB
}

static OutputType get(Env env) {
Expand Down

0 comments on commit 7454dda

Please sign in to comment.