We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d73570 commit b11e6edCopy full SHA for b11e6ed
src/search/scripts/index/utils/indexing-elasticsearch-utils.ts
@@ -55,10 +55,11 @@ export async function populateIndex(
55
client.helpers.bulk({
56
datasource: records,
57
onDocument: () => ({ index: { _index: indexAlias } }),
58
- flushBytes: 10_000_000, // stop before breaker trips
59
- concurrency: 2, // back-off a bit
+ flushBytes: 4 * 1024 * 1024, // 4MB - Prevents too large of a bulk request which results in a 429 from ES
+ concurrency: 2,
60
refreshOnCompletion: true,
61
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
63
}),
64
{
65
attempts,
0 commit comments