# PUT API request hangs

**URL:** <https://discuss.elastic.co/t/put-api-request-hangs/5443>\
**Category:** Elasticsearch\
**Created:** [September 23, 2011, 7:13pm UTC](https://discuss.elastic.co/t/put-api-request-hangs/5443 "2011-09-23T19:13:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![searchersteve](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/searchersteve/32/3008_2.png) [@searchersteve](https://discuss.elastic.co/u/searchersteve)\
**Post date:** [September 23, 2011, 7:13pm UTC](https://discuss.elastic.co/t/put-api-request-hangs/5443/1 "2011-09-23T19:13:27Z")

</div>

I have process that routinely submits content to ElasticSearch via  
cURL and the PUT method:

curl -XPUT '[http://localhost:9200/twitter/tweets/\_bulk](http://localhost:9200/twitter/tweets/_bulk)' -d 'XYZ INDEX  
STUFF'

This has worked fine for several months. Recently, certain requests  
have caused cURL to run indefinitely. When I submit a test request at  
the command line, my cURL client's progress bar tells me that it's  
transferred 6000 (bytes?). The progress bar stops at that number, but  
the "Total time" indicator keeps going and going.

Thinking there might be a problem with my index (I've submitted a  
number of DELETE BY queries recently), I deleted the entire index and  
started over. But the same thing keeps happening.

Has anyone else had this problem?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 23, 2011, 11:54pm UTC](https://discuss.elastic.co/t/put-api-request-hangs/5443/2 "2011-09-23T23:54:26Z")

</div>

Strange, it should not hang... . Is there a simple way to recreate it?

On Fri, Sep 23, 2011 at 10:13 PM, Steve Suo [stevesuo@gmail.com](mailto:stevesuo@gmail.com) wrote:

> I have process that routinely submits content to Elasticsearch via  
> cURL and the PUT method:
> 
> curl -XPUT '[http://localhost:9200/twitter/tweets/\_bulk](http://localhost:9200/twitter/tweets/_bulk)' -d 'XYZ INDEX  
> STUFF'
> 
> This has worked fine for several months. Recently, certain requests  
> have caused cURL to run indefinitely. When I submit a test request at  
> the command line, my cURL client's progress bar tells me that it's  
> transferred 6000 (bytes?). The progress bar stops at that number, but  
> the "Total time" indicator keeps going and going.
> 
> Thinking there might be a problem with my index (I've submitted a  
> number of DELETE BY queries recently), I deleted the entire index and  
> started over. But the same thing keeps happening.
> 
> Has anyone else had this problem?

---

<div class="post-metadata">

**Author:** ![searchersteve](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/searchersteve/32/3008_2.png) [@searchersteve](https://discuss.elastic.co/u/searchersteve)\
**Post date:** [September 24, 2011, 12:25am UTC](https://discuss.elastic.co/t/put-api-request-hangs/5443/3 "2011-09-24T00:25:05Z")

</div>

I'm afraid I can't think of how to recreate it. I could show you my  
mapping and the data that I am indexing. But as I say, it was all  
working fine until recently. And if there were an error in the mapping  
or API syntax, then ES should tell me right away, right?

I will spend some time on it and let you know what I find. First thing  
I plan to try is reboot ES.

On Sep 23, 4:54 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> Strange, it should not hang... . Is there a simple way to recreate it?
> 
> On Fri, Sep 23, 2011 at 10:13 PM, Steve Suo [steve...@gmail.com](mailto:steve...@gmail.com) wrote:
> 
> > I have process that routinely submits content to Elasticsearch via  
> > cURL and the PUT method:
> 
> > curl -XPUT '[http://localhost:9200/twitter/tweets/\_bulk'-d](http://localhost:9200/twitter/tweets/_bulk'-d) 'XYZ INDEX  
> > STUFF'
> 
> > This has worked fine for several months. Recently, certain requests  
> > have caused cURL to run indefinitely. When I submit a test request at  
> > the command line, my cURL client's progress bar tells me that it's  
> > transferred 6000 (bytes?). The progress bar stops at that number, but  
> > the "Total time" indicator keeps going and going.
> 
> > Thinking there might be a problem with my index (I've submitted a  
> > number of DELETE BY queries recently), I deleted the entire index and  
> > started over. But the same thing keeps happening.
> 
> > Has anyone else had this problem?

---

<div class="post-metadata">

**Author:** ![searchersteve](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/searchersteve/32/3008_2.png) [@searchersteve](https://discuss.elastic.co/u/searchersteve)\
**Post date:** [September 25, 2011, 12:32am UTC](https://discuss.elastic.co/t/put-api-request-hangs/5443/4 "2011-09-25T00:32:00Z")

</div>

Rebooting did the trick. Two things to mention: 1) The index was  
relatively large at one point (1m+ documents); 2) I ran a number of  
delete by queries to clear out stuff along the way. I did -XDELETE the  
entire index and restart, and still go the bad behavior. Only  
rebooting helped.

Hard to say what caused it, but problem solved for now.

Steve

On Sep 23, 5:25 pm, searchersteve [steve...@gmail.com](mailto:steve...@gmail.com) wrote:

> I'm afraid I can't think of how to recreate it. I could show you my  
> mapping and the data that I am indexing. But as I say, it was all  
> working fine until recently. And if there were an error in the mapping  
> or API syntax, then ES should tell me right away, right?
> 
> I will spend some time on it and let you know what I find. First thing  
> I plan to try is reboot ES.
> 
> On Sep 23, 4:54 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > Strange, it should not hang... . Is there a simple way to recreate it?
> 
> > On Fri, Sep 23, 2011 at 10:13 PM, Steve Suo [steve...@gmail.com](mailto:steve...@gmail.com) wrote:
> > 
> > > I have process that routinely submits content to Elasticsearch via  
> > > cURL and the PUT method:
> 
> > > curl -XPUT '[http://localhost:9200/twitter/tweets/\_bulk'-d'XYZ](http://localhost:9200/twitter/tweets/_bulk'-d'XYZ) INDEX  
> > > STUFF'
> 
> > > This has worked fine for several months. Recently, certain requests  
> > > have caused cURL to run indefinitely. When I submit a test request at  
> > > the command line, my cURL client's progress bar tells me that it's  
> > > transferred 6000 (bytes?). The progress bar stops at that number, but  
> > > the "Total time" indicator keeps going and going.
> 
> > > Thinking there might be a problem with my index (I've submitted a  
> > > number of DELETE BY queries recently), I deleted the entire index and  
> > > started over. But the same thing keeps happening.
> 
> > > Has anyone else had this problem?

---

<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:** [July 6, 2017, 3:53am UTC](https://discuss.elastic.co/t/put-api-request-hangs/5443/5 "2017-07-06T03:53:37Z")

</div>


