# Need help - Memory problems

**URL:** https://discuss.elastic.co/t/need-help-memory-problems/8678
**Category:** Elasticsearch
**Created:** [August 8, 2012, 3:14pm UTC](https://discuss.elastic.co/t/need-help-memory-problems/8678 "2012-08-08T15:14:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Greg\_2](https://avatars.discourse-cdn.com/v4/letter/g/50afbb/32.png) [@Greg\_2](https://discuss.elastic.co/u/Greg_2)
#### Post date: [August 8, 2012, 3:14pm UTC](https://discuss.elastic.co/t/need-help-memory-problems/8678/1 "2012-08-08T15:14:53Z")

</div>

Hi,

i need help with elasticsearch memory problem...

We use one instance of elasticsearch(0.19.8) with non root user:

jdk: 1.7.05 or 1.6.26 (64Bit)  
Xms=Xmx=1G.  
bootstrap.mlockall: true (max locked memory (kbytes, -l) unlimited)  
index.store.type: niofs  
cache.memory.direct: false  
gateway.type: local

The Server(VM, Linux, 64Bit, Kernel 2.6.26) has 4G memory and 1G swap.

I developed a river that downloads and indexed XML data periodically.  
The old indexes is deleted by the river, if new index creation was  
successfull and alias will be switched to new indexes.  
Currently, two indexes are created simultaneously with the size of each  
300-400MB(15000 docs).  
Heap size during the indexing is max. 400-600 MB. GC behavior: no probs, no  
full gc's ...  
BUT: virtual size of java process growing and after a few hours(2 index  
processes) server crashed because of out of memory (memory and swap are  
full).  
After indexing and deleting the old index(first indexing time) Memory usage  
goes down only slightly.

Does anyone have any idea?

Greetings,

Greg

---

<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, 3:17am UTC](https://discuss.elastic.co/t/need-help-memory-problems/8678/2 "2017-07-06T03:17:09Z")

</div>


