Closed
Description
🐛 Bug Report
When doing a lot of document indexing in parallel
const esClient = new Client({
node: config.ELASTICSEARCH,
maxRetries: 2,
requestTimeout: 3000,
});
await esClient.index(document);
it is throwing this error:
RequestAbortedError: Request aborted
at SniffingTransport.request (/us/ src/app/node_modules/@elastic/transport/lib/Transport.js:502:46)
at processTicksAndRejections (node:internal/process/task_ queues :95:5)
at runNextTicks (node:internal/process/task queues :64:3)
at listOnTimeout (node:internal/timers: 540:9)
at process.processTimers (node:internal/timers:514:7) {
To Reproduce
Steps to reproduce the behavior:
Paste your code here:
const esClient = new Client({
node: config.ELASTICSEARCH,
maxRetries: 2,
requestTimeout: 3000,
});
await esClient.index(document);
Try to index a lot of documents at the same time: 10k or more at the same time
Expected behavior
It should work.
It should reuse connections
maybe old keepAlive option helped
is there better way to start an elastic search client for production use?
Paste the results here:
not working
Your Environment
- node version: 16, 18, 20
@elastic/elasticsearch
version: 8.9.0- os: mac and linux
Metadata
Metadata
Assignees
Labels
No labels