# Why does it take long time to close the connection?

**URL:** <https://discuss.elastic.co/t/why-does-it-take-long-time-to-close-the-connection/4680>\
**Category:** Elasticsearch\
**Created:** [June 22, 2011, 12:55am UTC](https://discuss.elastic.co/t/why-does-it-take-long-time-to-close-the-connection/4680 "2011-06-22T00:55:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonInKorea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasoninkorea/32/38697_2.png) [@jasonInKorea](https://discuss.elastic.co/u/jasonInKorea)\
**Post date:** [June 22, 2011, 12:55am UTC](https://discuss.elastic.co/t/why-does-it-take-long-time-to-close-the-connection/4680/1 "2011-06-22T00:55:30Z")

</div>

Hi, everyone

I'm using elasticsearch to search massive data(twitter content).  
I satisfied with it's speed.  
But I'm why closing time is long.  
Blew is code searching twitter data.

Client client = new TransportClient()  
.addTransportAddress(new InetSocketTransportAddress("192.168.10.14", 9300));  
...  
client.close();

additional information  
elasticsearch version : 0.16.1  
hadoop version : 0.20.2  
jdk : 1.6.0\_25

---

<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:** [June 24, 2011, 10:07pm UTC](https://discuss.elastic.co/t/why-does-it-take-long-time-to-close-the-connection/4680/2 "2011-06-24T22:07:39Z")

</div>

You mean closing the transport client takes a lot of time? It should be pretty fast.

On Wednesday, June 22, 2011 at 3:55 AM, jasonInKorea wrote:

> Hi, everyone
> 
> I'm using elasticsearch to search massive data(twitter content).  
> I satisfied with it's speed.  
> But I'm why closing time is long.  
> Blew is code searching twitter data.
> 
> Client client = new TransportClient()  
> .addTransportAddress(new InetSocketTransportAddress("192.168.10.14",  
> 9300));  
> ...  
> client.close();
> 
> additional information  
> elasticsearch version : 0.16.1  
> hadoop version : 0.20.2  
> jdk : 1.6.0\_25
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/Why-does-it-take-long-time-to-close-the-connection-tp3093722p3093722.html](http://elasticsearch-users.115913.n3.nabble.com/Why-does-it-take-long-time-to-close-the-connection-tp3093722p3093722.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com) ([http://Nabble.com](http://Nabble.com)).

---

<div class="post-metadata">

**Author:** ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)\
**Post date:** [June 25, 2011, 10:40am UTC](https://discuss.elastic.co/t/why-does-it-take-long-time-to-close-the-connection/4680/3 "2011-06-25T10:40:32Z")

</div>

as shay mentioned: closing should be fast.

also have a look at my Open Twitter Search project:

> **[karussell/Jetwick](https://github.com/karussell/Jetwick)**
>
> Jetwick - \[not maintained\] Custom Twitter Search via ElasticSearch&Wicket

[http://jetsli.de/tweets/](http://jetsli.de/tweets/)

---

<div class="post-metadata">

**Author:** ![jasonInKorea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasoninkorea/32/38697_2.png) [@jasonInKorea](https://discuss.elastic.co/u/jasonInKorea)\
**Post date:** [June 27, 2011, 11:50pm UTC](https://discuss.elastic.co/t/why-does-it-take-long-time-to-close-the-connection/4680/4 "2011-06-27T23:50:23Z")

</div>

this problem is solved. It's my mistake.  
The reason is wrong way to use close method.  
I'm sorry you to confuse.

---

<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, 4:02am UTC](https://discuss.elastic.co/t/why-does-it-take-long-time-to-close-the-connection/4680/5 "2017-07-06T04:02:26Z")

</div>


