reindex method in class Elasticsearch timeout
See original GitHub issueWhen I’m using this method with body=‘{“source”:{“index”: …}, “dest”:{“index”: …}}’, the same with REST api, I get a timeout error from urllib3 as follows:
File "/usr/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 69, in _wrapped
return func(*args, params=params, **kwargs)
File "/usr/lib/python2.7/site-packages/elasticsearch/client/__init__.py", line 1278, in reindex
params=params, body=body)
File "/usr/lib/python2.7/site-packages/elasticsearch/transport.py", line 327, in perform_request
status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
File "/usr/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 102, in perform_request
raise ConnectionTimeout('TIMEOUT', str(e), e)
ConnectionTimeout: ConnectionTimeout caused by - ReadTimeoutError(HTTPConnectionPool(host=..., port=...): Read timed out. (read timeout=10))
However the reindex request did get passed to elasticsearch host and processed. It seems that the arguments of this method don’t work as it’s documented in either readthedocs or method description.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Reindex API | Elasticsearch Guide [8.5] | Elastic
Reindex supports Sliced scroll to parallelize the reindexing process. ... This guarantees Elasticsearch waits for at least the timeout before failing.
Read more >Avoid timeout in Elasticsearch re-indexing in Java
I don't think its a better choice to wait indefinitely to complete the re-indexing process and give very high value for timeout as...
Read more >AbstractBulkByScrollRequest.setTimeout - Java - Tabnine
public Self timeout(TimeValue timeout) { request.setTimeout(timeout) ... setTimeout. method. in. org.elasticsearch.index.reindex.AbstractBulkByScrollRequest ...
Read more >Helpers — Elasticsearch 7.16.0 documentation
All bulk helpers accept an instance of Elasticsearch class and an iterable ... The items in the action iterable should be the documents...
Read more >ReindexRequestBuilder (server 7.9.3 API) - javadoc.io
Setup reindexing from a remote cluster. Methods inherited from class org.elasticsearch.index.reindex.AbstractBulkIndexByScrollRequestBuilder · script. Methods ...
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
This error means that you didn’t get a response from elasticsearch in the allotted time (10 seconds by default). Which makes sense since the reindexing is a big operation.
To avoid this you need to set your timeout higher - either for the whole client (by passing
timeout=N
when creating the client) or for this individual request using therequest_timeout=N
parameter to thereindex
call.Hope this helps
Well noted and I appreciate your effort on this issue @HonzaKral Have a nice day~