# Configuring thread size in jvm.dll when installing Elasticsearch as a service

**URL:** <https://discuss.elastic.co/t/configuring-thread-size-in-jvm-dll-when-installing-elasticsearch-as-a-service/71532>\
**Category:** Elasticsearch\
**Created:** [January 13, 2017, 2:54pm UTC](https://discuss.elastic.co/t/configuring-thread-size-in-jvm-dll-when-installing-elasticsearch-as-a-service/71532 "2017-01-13T14:54:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Annie178](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@Annie178](https://discuss.elastic.co/u/Annie178)\
**Post date:** [January 13, 2017, 2:54pm UTC](https://discuss.elastic.co/t/configuring-thread-size-in-jvm-dll-when-installing-elasticsearch-as-a-service/71532/1 "2017-01-13T14:54:29Z")

</div>

Hi all,

When I am installing elasticsearch (5.0.1) version as a service in Windows I receive the following error:

thread stack size not set; configure using -Xss via C:\Temp\Elasticsearch\elasticsearch-5.0.1\config\jvm.options or ES\_JAVA\_OPTS

I have no idea what to do here apart from go the file that they specify. I don't know what to do at this stage.  
Can anybody please explain to me what they are asking and how fix it ?

Thanks in advance for any help!

Anne Marie

---

<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 16, 2017, 12:49am UTC](https://discuss.elastic.co/t/configuring-thread-size-in-jvm-dll-when-installing-elasticsearch-as-a-service/71532/2 "2017-01-16T00:49:23Z")

</div>

Have a read through [Setup Elasticsearch | Elasticsearch Guide [5.1] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/5.1/setup.html)

The file you want to edit is;

> [@Annie178](#):
>
> C:\Temp\Elasticsearch\elasticsearch-5.0.1\config\jvm.options

---

<div class="post-metadata">

**Author:** ![Annie178](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@Annie178](https://discuss.elastic.co/u/Annie178)\
**Post date:** [January 23, 2017, 3:37pm UTC](https://discuss.elastic.co/t/configuring-thread-size-in-jvm-dll-when-installing-elasticsearch-as-a-service/71532/3 "2017-01-23T15:37:42Z")

</div>

Hi Mark,

Thanks for your help. I've read the link and I would like to ask another question.

I have set -Xss to -Xss128m in the jvm.options file. This works and I can run elasticsearch as a service, but I have no idea if this value is a sensible value to use.

In the link you sent above, it says that if you are using a 32 bit JVM you should set the value to -Xss320k.

I installed a 64 bit version of Java but the above link doesn't give a guideline as to what I should configure the thread stack size to. Would you know what value I should use?

Thanks so much for your help!

Anne Marie

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [January 23, 2017, 5:23pm UTC](https://discuss.elastic.co/t/configuring-thread-size-in-jvm-dll-when-installing-elasticsearch-as-a-service/71532/4 "2017-01-23T17:23:44Z")

</div>

> [@Annie178](#):
>
> I installed a 64 bit version of Java but the above link doesn't give a guideline as to what I should configure the thread stack size to. Would you know what value I should use?

In 5.0.1 you should set it to `-Xss1m`, or you can upgrade to 5.1.2 where this is shipped as a default setting.

---

<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:** [February 20, 2017, 5:23pm UTC](https://discuss.elastic.co/t/configuring-thread-size-in-jvm-dll-when-installing-elasticsearch-as-a-service/71532/5 "2017-02-20T17:23:47Z")

</div>

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