# Reindex Python API timeout

**URL:** <https://discuss.elastic.co/t/reindex-python-api-timeout/171114>\
**Category:** Elasticsearch\
**Created:** [March 6, 2019, 12:45pm UTC](https://discuss.elastic.co/t/reindex-python-api-timeout/171114 "2019-03-06T12:45:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praneet\_Khandelwal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praneet_khandelwal/32/40565_2.png) [@Praneet\_Khandelwal](https://discuss.elastic.co/u/Praneet_Khandelwal)\
**Post date:** [March 6, 2019, 12:45pm UTC](https://discuss.elastic.co/t/reindex-python-api-timeout/171114/1 "2019-03-06T12:45:27Z")

</div>

I am using **reindex api** in python with **wait\_for\_completion = True**. But when I run the script, it gives me a timeout error (maybe because it waits for min(default timeout period, time for reindexing) ) and returns. And it also returns without outputting the task id. The issue I am facing is that I need to repeatedly check the number of documents that have been reindexed to make sure everything is going fine. What I need is that I get to know when any error in reindexing occurs.  
This purpose was served when I tried reindexing using curl from the command line. Is there a way to get the same behaviour in the python script (one way is to execute the curl command in python code).

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [March 6, 2019, 1:19pm UTC](https://discuss.elastic.co/t/reindex-python-api-timeout/171114/2 "2019-03-06T13:19:50Z")

</div>

You should probably put python in the title of this post to help people that know the python client find it.

---

<div class="post-metadata">

**Author:** ![Praneet\_Khandelwal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praneet_khandelwal/32/40565_2.png) [@Praneet\_Khandelwal](https://discuss.elastic.co/u/Praneet_Khandelwal)\
**Post date:** [March 7, 2019, 7:50am UTC](https://discuss.elastic.co/t/reindex-python-api-timeout/171114/3 "2019-03-07T07:50:32Z")

</div>

Where can I see the logs for the reindexing process?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 4, 2019, 7:50am UTC](https://discuss.elastic.co/t/reindex-python-api-timeout/171114/4 "2019-04-04T07:50:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
