# ElasticSearch not starting after export ES\_HEAP\_SIZE=10g

**URL:** <https://discuss.elastic.co/t/elasticsearch-not-starting-after-export-es-heap-size-10g/92145>\
**Category:** Elasticsearch\
**Created:** [July 6, 2017, 4:58pm UTC](https://discuss.elastic.co/t/elasticsearch-not-starting-after-export-es-heap-size-10g/92145 "2017-07-06T16:58:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mussa572](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@mussa572](https://discuss.elastic.co/u/mussa572)\
**Post date:** [July 6, 2017, 4:58pm UTC](https://discuss.elastic.co/t/elasticsearch-not-starting-after-export-es-heap-size-10g/92145/1 "2017-07-06T16:58:35Z")

</div>

Hi Elastic Team

I was having some memeory issue where Elasticseach was not start after a reload . Even No logs were genrated . after searching on google I notice that issue could be related to HEAP size .

I used the following command after reading on elastic site to increase the heapsize from 2g to 4gb .

[root@bin]# export ES\_HEAP\_SIZE=10g

I am now getting the following error when I try to start the elasticsearch . Please advise what is the option to disable the above command and how can I increase heap value .

[root@bin]#./elasticsearch  
Error: encountered environment variables that are no longer supported  
Use jvm.options or ES\_JAVA\_OPTS to configure the JVM  
ES\_HEAP\_SIZE=10g: set -Xms10g and -Xmx10g in jvm.options or add "-Xms10g -Xmx10g" to ES\_JAVA\_OPTS

---

<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:** [July 6, 2017, 5:30pm UTC](https://discuss.elastic.co/t/elasticsearch-not-starting-after-export-es-heap-size-10g/92145/2 "2017-07-06T17:30:36Z")

</div>

The error message explains exactly what you need to do. What is unclear in this message?

---

<div class="post-metadata">

**Author:** ![niraj\_kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_kumar/32/4130_2.png) [@niraj\_kumar](https://discuss.elastic.co/u/niraj_kumar)\
**Post date:** [July 6, 2017, 5:31pm UTC](https://discuss.elastic.co/t/elasticsearch-not-starting-after-export-es-heap-size-10g/92145/3 "2017-07-06T17:31:05Z")

</div>

> [@mussa572](#):
>
> now getting the following error when I try to start the

Use the below commands

unset ES\_HEAP\_SIZE  
And modify the file in /etc/elasticsearch/jvm.options

Modify the below line in the above file

# Xms represents the initial size of total heap space

# Xmx represents the maximum size of total heap space

-Xms2g  
-Xmx2g

--  
Niraj

---

<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:** [August 3, 2017, 5:31pm UTC](https://discuss.elastic.co/t/elasticsearch-not-starting-after-export-es-heap-size-10g/92145/4 "2017-08-03T17:31:26Z")

</div>

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