# bulkRequest.get() hangs

**URL:** <https://discuss.elastic.co/t/bulkrequest-get-hangs/95795>\
**Category:** Elasticsearch\
**Created:** [August 4, 2017, 1:47am UTC](https://discuss.elastic.co/t/bulkrequest-get-hangs/95795 "2017-08-04T01:47:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rohit\_Nigam](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@Rohit\_Nigam](https://discuss.elastic.co/u/Rohit_Nigam)\
**Post date:** [August 4, 2017, 1:47am UTC](https://discuss.elastic.co/t/bulkrequest-get-hangs/95795/1 "2017-08-04T01:47:45Z")

</div>

Hi  
I am using java transport client 5.5.0 and I have deployed elastic search version 5.5.0 using kubernetes in google container engine. I am using BulkRequestBuilder api to do number of inserts and also waiting for their responses to come back  
BulkRequestBuilder bulkRequest = client.prepareBulk();  
BulkResponse bulkResponse = bulkRequest.get();  
if (bulkResponse.hasFailures()) {  
...  
}  
I was getting response back from the elastic search and all of a sudden it has stopped ,it seems to hang for ever.  
bulkRequest.get();  
Not sure why all of a sudden it has stopped working? Any help would be really appreciated.

Regards  
Rohit

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 4, 2017, 7:02am UTC](https://discuss.elastic.co/t/bulkrequest-get-hangs/95795/2 "2017-08-04T07:02:43Z")

</div>

Hard to tell what happened without further insight, as there might have been network outages, containers being killed. Logfiles would help a lot here. Knowing if all of the hosts are reachable during that outage as well.

In general: You should not use blocking calls without a timeout when sending bulkrequests. Either add a timeout (even a high one like one minute) or use the listener based API.

---

<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:** [September 1, 2017, 7:02am UTC](https://discuss.elastic.co/t/bulkrequest-get-hangs/95795/3 "2017-09-01T07:02:43Z")

</div>

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