# ES running out of memory for bulk import

**URL:** https://discuss.elastic.co/t/es-running-out-of-memory-for-bulk-import/12630
**Category:** Elasticsearch
**Created:** [July 3, 2013, 1:53am UTC](https://discuss.elastic.co/t/es-running-out-of-memory-for-bulk-import/12630 "2013-07-03T01:53:21Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jerkywez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerkywez/32/2155_2.png) [@jerkywez](https://discuss.elastic.co/u/jerkywez)
#### Post date: [July 3, 2013, 1:53am UTC](https://discuss.elastic.co/t/es-running-out-of-memory-for-bulk-import/12630/1 "2013-07-03T01:53:21Z")

</div>

Hi,

Im currently doing a large bulk import from mongodb into ES, the ES process  
keeps on dying after a while, im assuming its running out of memory.

Ive got the following memory settings:  
-Xms=512m  
-Xmx=1500m

The logs are printing out this before it dies:

[2013-07-02 21:42:19,792][INFO][monitor.jvm] [Landslide]  
[gc][ParNew][495][1351] duration [917ms], collections [1]/[1.4s], total  
[917ms]/[1.1m], memory [405.2mb]-\>[375mb]/[1.4gb], all\_pools {[Code Cache]  
[6mb]-\>[6mb]/[48mb]}{[Par Eden Space] [38.8mb]-\>[3.4mb]/[133.1mb]}{[Par  
Survivor Space] [7mb]-\>[6.1mb]/[16.6mb]}{[CMS Old Gen]  
[359.5mb]-\>[365.4mb]/[1.3gb]}{[CMS Perm Gen] [41.3mb]-\>[41.3mb]/[166mb]}

Can anyone please help with this?

--  
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: ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)
#### Post date: [July 3, 2013, 5:15am UTC](https://discuss.elastic.co/t/es-running-out-of-memory-for-bulk-import/12630/2 "2013-07-03T05:15:47Z")

</div>

Hi,

The short "answer" is: it's 2013, can you give it a bigger Xmx? (and make  
Xms that same value)

## Otis

Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)  
Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)

On Tuesday, July 2, 2013 9:53:21 PM UTC-4, Wesley Archbell wrote:

> Hi,
> 
> Im currently doing a large bulk import from mongodb into ES, the ES  
> process keeps on dying after a while, im assuming its running out of memory.
> 
> Ive got the following memory settings:  
> -Xms=512m  
> -Xmx=1500m
> 
> The logs are printing out this before it dies:
> 
> [2013-07-02 21:42:19,792][INFO][monitor.jvm] [Landslide]  
> [gc][ParNew][495][1351] duration [917ms], collections [1]/[1.4s], total  
> [917ms]/[1.1m], memory [405.2mb]-\>[375mb]/[1.4gb], all\_pools {[Code Cache]  
> [6mb]-\>[6mb]/[48mb]}{[Par Eden Space] [38.8mb]-\>[3.4mb]/[133.1mb]}{[Par  
> Survivor Space] [7mb]-\>[6.1mb]/[16.6mb]}{[CMS Old Gen]  
> [359.5mb]-\>[365.4mb]/[1.3gb]}{[CMS Perm Gen] [41.3mb]-\>[41.3mb]/[166mb]}
> 
> Can anyone please help with this?

--  
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: ![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 3, 2013, 7:01am UTC](https://discuss.elastic.co/t/es-running-out-of-memory-for-bulk-import/12630/3 "2013-07-03T07:01:02Z")

</div>

I add to Otis's answer that you could also decrease the number of docs per Bulk.  
How many docs do you send each time?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 3 juil. 2013 à 07:15, Otis Gospodnetic [otis.gospodnetic@gmail.com](mailto:otis.gospodnetic@gmail.com) a écrit :

Hi,

The short "answer" is: it's 2013, can you give it a bigger Xmx? (and make Xms that same value)

## Otis

Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)  
Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)

On Tuesday, July 2, 2013 9:53:21 PM UTC-4, Wesley Archbell wrote:

> Hi,
> 
> Im currently doing a large bulk import from mongodb into ES, the ES process keeps on dying after a while, im assuming its running out of memory.
> 
> Ive got the following memory settings:  
> -Xms=512m  
> -Xmx=1500m
> 
> The logs are printing out this before it dies:
> 
> [2013-07-02 21:42:19,792][INFO][monitor.jvm] [Landslide] [gc][ParNew][495][1351] duration [917ms], collections [1]/[1.4s], total [917ms]/[1.1m], memory [405.2mb]-\>[375mb]/[1.4gb], all\_pools {[Code Cache] [6mb]-\>[6mb]/[48mb]}{[Par Eden Space] [38.8mb]-\>[3.4mb]/[133.1mb]}{[Par Survivor Space] [7mb]-\>[6.1mb]/[16.6mb]}{[CMS Old Gen] [359.5mb]-\>[365.4mb]/[1.3gb]}{[CMS Perm Gen] [41.3mb]-\>[41.3mb]/[166mb]}
> 
> Can anyone please help with this?

--  
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).

--  
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: ![jerkywez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerkywez/32/2155_2.png) [@jerkywez](https://discuss.elastic.co/u/jerkywez)
#### Post date: [July 10, 2013, 6:05am UTC](https://discuss.elastic.co/t/es-running-out-of-memory-for-bulk-import/12630/4 "2013-07-10T06:05:31Z")

</div>

Yep all good now, the box only had 912MB... made it 4Gb and gave ES 2Gb all  
good now.

On Wednesday, July 3, 2013 3:15:47 PM UTC+10, Otis Gospodnetic wrote:

> Hi,
> 
> The short "answer" is: it's 2013, can you give it a bigger Xmx? (and make  
> Xms that same value)
> 
> ## Otis
> 
> Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)  
> Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)
> 
> On Tuesday, July 2, 2013 9:53:21 PM UTC-4, Wesley Archbell wrote:
> 
> > Hi,
> > 
> > Im currently doing a large bulk import from mongodb into ES, the ES  
> > process keeps on dying after a while, im assuming its running out of memory.
> > 
> > Ive got the following memory settings:  
> > -Xms=512m  
> > -Xmx=1500m
> > 
> > The logs are printing out this before it dies:
> > 
> > [2013-07-02 21:42:19,792][INFO][monitor.jvm] [Landslide]  
> > [gc][ParNew][495][1351] duration [917ms], collections [1]/[1.4s], total  
> > [917ms]/[1.1m], memory [405.2mb]-\>[375mb]/[1.4gb], all\_pools {[Code Cache]  
> > [6mb]-\>[6mb]/[48mb]}{[Par Eden Space] [38.8mb]-\>[3.4mb]/[133.1mb]}{[Par  
> > Survivor Space] [7mb]-\>[6.1mb]/[16.6mb]}{[CMS Old Gen]  
> > [359.5mb]-\>[365.4mb]/[1.3gb]}{[CMS Perm Gen] [41.3mb]-\>[41.3mb]/[166mb]}
> > 
> > Can anyone please help with this?

--  
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: ![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:27am UTC](https://discuss.elastic.co/t/es-running-out-of-memory-for-bulk-import/12630/5 "2017-07-06T02:27:21Z")

</div>


