Skip to content

Commit b11e6ed

Browse files
authored
Attempt index fix round 3 (#55901)
1 parent 9d73570 commit b11e6ed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/search/scripts/index/utils/indexing-elasticsearch-utils.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ export async function populateIndex(
5555
client.helpers.bulk({
5656
datasource: records,
5757
onDocument: () => ({ index: { _index: indexAlias } }),
58-
flushBytes: 10_000_000, // stop before breaker trips
59-
concurrency: 2, // back-off a bit
58+
flushBytes: 4 * 1024 * 1024, // 4MB - Prevents too large of a bulk request which results in a 429 from ES
59+
concurrency: 2,
6060
refreshOnCompletion: true,
6161
timeout: '5m',
62+
// We could use `retries` and `wait` here, but then we don't have as granular control over logging and when to retry
6263
}),
6364
{
6465
attempts,

0 commit comments

Comments
 (0)