# Unable to stop Elasticsearch process

**URL:** https://discuss.elastic.co/t/unable-to-stop-elasticsearch-process/12319
**Category:** Elasticsearch
**Created:** [June 7, 2013, 3:21pm UTC](https://discuss.elastic.co/t/unable-to-stop-elasticsearch-process/12319 "2013-06-07T15:21:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sai](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@sai](https://discuss.elastic.co/u/sai)
#### Post date: [June 7, 2013, 3:21pm UTC](https://discuss.elastic.co/t/unable-to-stop-elasticsearch-process/12319/1 "2013-06-07T15:21:45Z")

</div>

Hi,  
I recently ran a query for searching 4 million records. My heapsize was only 1 GB and so I got an out of memory exception. I ran the query several times just to make sure. Later I decided to increase the heap size. But no matter how many times I exitted the terminal I am unable to stop the elasticsearch process, which was not the case before. I am still able to execute the curl command to contact the elasticsearch server, even though the ps command shows that neither java not elasticsearch is running. Also if I try to start the elasticsearch process anyway with increased heapsize, I get the following error : Out of memory could not create native threads. Any advice would be great. Thanks.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [June 14, 2013, 3:41pm UTC](https://discuss.elastic.co/t/unable-to-stop-elasticsearch-process/12319/2 "2013-06-14T15:41:26Z")

</div>

Did you try a ps -ef command to see running process and find the PID number?  
Then kill -9 that process?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 7 juin 2013 à 17:21, sai [saironprasanna@gmail.com](mailto:saironprasanna@gmail.com) a écrit :

> Hi,  
> I recently ran a query for searching 4 million records. My heapsize was  
> only 1 GB and so I got an out of memory exception. I ran the query several  
> times just to make sure. Later I decided to increase the heap size. But no  
> matter how many times I exitted the terminal I am unable to stop the  
> elasticsearch process, which was not the case before. I am still able to  
> execute the curl command to contact the elasticsearch server, even though  
> the ps command shows that neither java not elasticsearch is running. Also if  
> I try to start the elasticsearch process anyway with increased heapsize, I  
> get the following error : Out of memory could not create native threads. Any  
> advice would be great. Thanks.
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/Unable-to-stop-Elasticsearch-process-tp4036222.html](http://elasticsearch-users.115913.n3.nabble.com/Unable-to-stop-Elasticsearch-process-tp4036222.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![sai](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@sai](https://discuss.elastic.co/u/sai)
#### Post date: [June 14, 2013, 3:45pm UTC](https://discuss.elastic.co/t/unable-to-stop-elasticsearch-process/12319/3 "2013-06-14T15:45:33Z")

</div>

Hi dadoonet thanks for the idea. I later tried a ps -aux and realized that  
there were several instances of java vm running inspite of the reboots and  
logouts. I forcibly removed them and was able to stop the elasticsearch  
process. Thank you very much.  
On Jun 14, 2013 9:42 AM, "dadoonet [via Elasticsearch Users]" \<  
[ml-node+s115913n4036603h54@n3.nabble.com](mailto:ml-node+s115913n4036603h54@n3.nabble.com)\> wrote:

> Did you try a ps -ef command to see running process and find the PID  
> number?  
> Then kill -9 that process?
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)  
> | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 7 juin 2013 à 17:21, sai \<[hidden email][http://user/SendEmail.jtp?type=node&node=4036603&i=0](http://user/SendEmail.jtp?type=node&node=4036603&i=0)\>  
> a écrit :
> 
> Hi,  
> I recently ran a query for searching 4 million records. My heapsize was  
> only 1 GB and so I got an out of memory exception. I ran the query several  
> times just to make sure. Later I decided to increase the heap size. But no  
> matter how many times I exitted the terminal I am unable to stop the  
> elasticsearch process, which was not the case before. I am still able to  
> execute the curl command to contact the elasticsearch server, even though  
> the ps command shows that neither java not elasticsearch is running. Also  
> if  
> I try to start the elasticsearch process anyway with increased heapsize, I  
> get the following error : Out of memory could not create native threads.  
> Any  
> advice would be great. Thanks.
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Unable-to-stop-Elasticsearch-process-tp4036222.html](http://elasticsearch-users.115913.n3.nabble.com/Unable-to-stop-Elasticsearch-process-tp4036222.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [hidden email][http://user/SendEmail.jtp?type=node&node=4036603&i=1](http://user/SendEmail.jtp?type=node&node=4036603&i=1)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> _smime.p7s_ (1K) Download Attachment[http://elasticsearch-users.115913.n3.nabble.com/attachment/4036603/0/smime.p7s](http://elasticsearch-users.115913.n3.nabble.com/attachment/4036603/0/smime.p7s)
> 
> * * *
> 
> If you reply to this email, your message will be added to the discussion  
> below:
> 
> [http://elasticsearch-users.115913.n3.nabble.com/Unable-to-stop-Elasticsearch-process-tp4036222p4036603.html](http://elasticsearch-users.115913.n3.nabble.com/Unable-to-stop-Elasticsearch-process-tp4036222p4036603.html)  
> To unsubscribe from Unable to stop Elasticsearch process, click here[http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe\_by\_code&node=4036222&code=c2Fpcm9ucHJhc2FubmFAZ21haWwuY29tfDQwMzYyMjJ8LTQ2NzA1ODM2Nw==](http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4036222&code=c2Fpcm9ucHJhc2FubmFAZ21haWwuY29tfDQwMzYyMjJ8LTQ2NzA1ODM2Nw==)  
> .  
> NAML[http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro\_viewer&id=instant\_html!nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify\_subscribers!nabble%3Aemail.naml-instant\_emails!nabble%3Aemail.naml-send\_instant\_email!nabble%3Aemail.naml](http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml)

---

<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, 2:31am UTC](https://discuss.elastic.co/t/unable-to-stop-elasticsearch-process/12319/4 "2017-07-06T02:31:13Z")

</div>


