requestTimeout has no effect (@elastic/elasticsearch v6.8.0),
See original GitHub issueI am trying to set a relavtively short requestTimout, but it seems that the requestTimeout has no effect at all. Tried setting it to 0ms ans 1ms, but it does not time out, and the requests finishes successfully.
Client is created like this:
const client = new Client({
node: url,
requestTimeout: 0
});
and I do an mget()
to fetch multiple documents:
const fetchDocuments = (ids) => {
const docs = ids.map((id) => {
return {
_index: 'my-index',
_type: '_doc',
_id: id,
};
});
return client.mget({
body: { docs }
});
};
No matter what I set the requestTimeout to, it does not time out. This becomes an issue if elastic is unresponsive, and the requests hang.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Requesting Elasticsearch from Node times out - Stack Overflow
This fails with a simple error message Errror: Request timeout after 30000ms. Am I missing something here? I've read trough the client docs,...
Read more >Migrating to 8.0 | Elasticsearch Guide [8.5] | Elastic
This section discusses the changes that you need to be aware of when migrating your application to Elasticsearch 8.0. See also What's new...
Read more >@elastic/elasticsearch - npm
The official Elasticsearch client for Node.js. Latest version: 8.5.0, last published: 2 months ago. Start using @elastic/elasticsearch in ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@delvedor I was able to work around this using
Promise.race([...])
(https://italonascimento.github.io/applying-a-timeout-to-your-promises/). I’ll try to se if I can reproduce usinges-reproduce-issue
, or determine if there is a flaw in my implmentation, when I have the time to look into it.I’m also seeing
requestTimeout
, say 10000, have seemingly no effect with v6.8.3.