# ElasticSearch throwing “OutOfMemoryError\[unable to create new native thread\]”

**URL:** <https://discuss.elastic.co/t/elasticsearch-throwing-outofmemoryerror-unable-to-create-new-native-thread/40398>\
**Category:** Elasticsearch\
**Created:** [January 28, 2016, 5:48pm UTC](https://discuss.elastic.co/t/elasticsearch-throwing-outofmemoryerror-unable-to-create-new-native-thread/40398 "2016-01-28T17:48:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kvalle](https://avatars.discourse-cdn.com/v4/letter/k/e5b9ba/32.png) [@kvalle](https://discuss.elastic.co/u/kvalle)\
**Post date:** [January 28, 2016, 5:48pm UTC](https://discuss.elastic.co/t/elasticsearch-throwing-outofmemoryerror-unable-to-create-new-native-thread/40398/1 "2016-01-28T17:48:04Z")

</div>

Hello!

I'm new to Elasticsearch and I've been seeing various posts saying that the number of threads is responsible for this error. I've compared output from my dev server and production (production is the problem) and get different outputs. The command I ran was: curl -XGET 'localhost:9200/\_nodes/thread\_pool?pretty'

This returns (production):  
{  
"cluster\_name" : "elasticsearch",  
"nodes" : {  
"eBNwhHo1RuGOui1XFus8vA" : {  
"name" : "Terminus",  
"transport\_address" : "inet[/216.243.23.200:9300]",  
"host" : "[crm1-sea401.spectrumnet.us](http://crm1-sea401.spectrumnet.us)",  
"ip" : "216.243.23.200",  
"version" : "1.3.1",  
"build" : "2de6dc5",  
"http\_address" : "inet[/216.243.23.200:9200]",  
"thread\_pool" : {  
"percolate" : {  
"type" : "fixed",  
"min" : 8,  
"max" : 8,  
"queue\_size" : "1k"  
},  
"snapshot\_data" : {  
"type" : "scaling",  
"min" : 1,  
"max" : 5,  
"keep\_alive" : "5m",  
"queue\_size" : -1  
},  
"bench" : {  
"type" : "scaling",  
"min" : 1,  
"max" : 4,  
"keep\_alive" : "5m",  
"queue\_size" : -1  
},  
"index" : {  
"type" : "fixed",  
"min" : 8,  
"max" : 8,  
"queue\_size" : "200"  
},  
"refresh" : {  
"type" : "scaling",  
"min" : 1,  
"max" : 4,  
"keep\_alive" : "5m",  
"queue\_size" : -1  
},  
"suggest" : {  
"type" : "fixed",  
"min" : 8,  
"max" : 8,  
"queue\_size" : "1k"  
},  
"generic" : {  
"type" : "cached",  
"keep\_alive" : "30s",  
"queue\_size" : -1  
},  
"warmer" : {  
"type" : "scaling",  
"min" : 1,  
"max" : 4,  
"keep\_alive" : "5m",  
"queue\_size" : -1  
},  
"search" : {  
"type" : "fixed",  
"min" : 24,  
"max" : 24,  
"queue\_size" : "1k"  
},  
"flush" : {  
"type" : "scaling",  
"min" : 1,  
"max" : 4,  
"keep\_alive" : "5m",  
"queue\_size" : -1  
},  
"optimize" : {  
"type" : "fixed",  
"min" : 1,  
"max" : 1,  
"queue\_size" : -1  
},  
"management" : {  
"type" : "scaling",  
"min" : 1,  
"max" : 5,  
"keep\_alive" : "5m",  
"queue\_size" : -1  
},  
"get" : {  
"type" : "fixed",  
"min" : 8,  
"max" : 8,  
"queue\_size" : "1k"  
},  
"merge" : {  
"type" : "scaling",  
"min" : 1,  
"max" : 4,  
"keep\_alive" : "5m",  
"queue\_size" : -1  
},  
"bulk" : {  
"type" : "fixed",  
"min" : 8,  
"max" : 8,  
"queue\_size" : "50"  
},  
"snapshot" : {  
"type" : "scaling",  
"min" : 1,  
"max" : 4,  
"keep\_alive" : "5m",  
"queue\_size" : -1  
}  
}  
}  
}  
}

The call: wget localhos:9200 returns

Resolving localhost... ::1, 127.0.0.1  
Connecting to localhost|::1|:9200... connected.  
HTTP request sent, awaiting response... 500 Internal Server Error  
2016-01-28 09:33:28 ERROR 500: Internal Server Error.

Any ideas what's going on?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 29, 2016, 1:19am UTC](https://discuss.elastic.co/t/elasticsearch-throwing-outofmemoryerror-unable-to-create-new-native-thread/40398/2 "2016-01-29T01:19:23Z")

</div>

What do your ES logs show, there should be something at the same time.

---

<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 5, 2017, 11:20pm UTC](https://discuss.elastic.co/t/elasticsearch-throwing-outofmemoryerror-unable-to-create-new-native-thread/40398/3 "2017-07-05T23:20:35Z")

</div>


