# TranslogException \[Failed to write operation \]

**URL:** <https://discuss.elastic.co/t/translogexception-failed-to-write-operation/87840>\
**Category:** Elasticsearch\
**Created:** [June 1, 2017, 5:10am UTC](https://discuss.elastic.co/t/translogexception-failed-to-write-operation/87840 "2017-06-01T05:10:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SKumarMN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skumarmn/32/27537_2.png) [@SKumarMN](https://discuss.elastic.co/u/SKumarMN)\
**Post date:** [June 1, 2017, 5:10am UTC](https://discuss.elastic.co/t/translogexception-failed-to-write-operation/87840/1 "2017-06-01T05:10:38Z")

</div>

Hi All,

I see below error logs in ES, can you please guide why one might get the below exception

I am using ES 2.3.3 Heap size is 6G

[ep\_fo\_people\_search\_e92pbg01][[ep\_fo\_people\_search\_e92pbg01][1]] TranslogException[Failed to write operation [Create{id='[http://plef4001.us.com:8000/psc/e92pbg01x\_newwin/EMPLOYEE/E92PBG01/c/FO\_EMPLOYEE.FO\_EMPLOYEE.GBL?Page=FO\_EMP\_PERS\_DATA1&Action=U&EMPLID=XE009100000](http://plef4001.us.com:8000/psc/e92pbg01x_newwin/EMPLOYEE/E92PBG01/c/FO_EMPLOYEE.FO_EMPLOYEE.GBL?Page=FO_EMP_PERS_DATA1&Action=U&EMPLID=XE009100000)', type='ep\_fo\_people\_search\_e92pbg01'}]]; nested: OutOfMemoryError[Java heap space];  
at org.elasticsearch.index.translog.Translog.add(Translog.java:557)  
at org.elasticsearch.index.engine.InternalEngine.innerCreateNoLock(InternalEngine.java:440)  
at org.elasticsearch.index.engine.InternalEngine.innerCreate(InternalEngine.java:378)  
at org.elasticsearch.index.engine.InternalEngine.create(InternalEngine.java:349)  
at org.elasticsearch.index.shard.IndexShard.create(IndexShard.java:545)  
at org.elasticsearch.index.engine.Engine$Create.execute(Engine.java:810)  
at org.elasticsearch.action.index.TransportIndexAction.executeIndexRequestOnPrimary(TransportIndexAction.java:237)  
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:326)  
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardUpdateOperation(TransportShardBulkAction.java:389)  
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:191)  
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:68)  
at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryPhase.doRun(TransportReplicationAction.java:639)  
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)  
at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryOperationTransportHandler.messageReceived(TransportReplicationAction.java:279)  
at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryOperationTransportHandler.messageReceived(TransportReplicationAction.java:271)  
at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:75)  
at org.elasticsearch.transport.TransportService$4.doRun(TransportService.java:376)  
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
at java.lang.Thread.run(Thread.java:745)  
Caused by: java.lang.OutOfMemoryError: Java heap space

---

<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:** [June 1, 2017, 5:33am UTC](https://discuss.elastic.co/t/translogexception-failed-to-write-operation/87840/2 "2017-06-01T05:33:20Z")

</div>

```
OutOfMemoryError: Java heap space

```

Not enough HEAP available apparently.

Why? No idea without knowing anything about your cluster.

---

<div class="post-metadata">

**Author:** ![SKumarMN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skumarmn/32/27537_2.png) [@SKumarMN](https://discuss.elastic.co/u/SKumarMN)\
**Post date:** [June 1, 2017, 5:37am UTC](https://discuss.elastic.co/t/translogexception-failed-to-write-operation/87840/3 "2017-06-01T05:37:35Z")

</div>

Hi,

I have a single node ES 2.3.2 cluster with 6G Heap running on Redhat 6.x machine. I am indexing docs using bulk api. Using curl 50 parallel bulk requests are hitting ES and each of size 12MB-15MB approx. after indexing around 1.7 million docs, i see Java OOM issue and I see the below info statements in logs

java.lang.OutOfMemoryError: Java heap space  
[2017-05-31 20:15:31,535][INFO][monitor.jvm] [pleej09\_1] [gc][old][17986][7548] duration [5.2s], collections [1]/[5.5s], total [5.2s]/[11.1h], memory [5.7gb]-\>[5.7gb]/[5.8gb], all\_pools {[young] [1.4gb]-\>[1.4gb]/[1.4gb]}{[survivor] [173.4mb]-\>[150.1mb]/[191.3mb]}{[old] [4.1gb]-\>[4.1gb]/[4.1gb]}  
[2017-05-31 20:15:42,188][INFO][monitor.jvm] [pleej09\_1] [gc][old][17988][7550] duration [5.3s], collections [1]/[5.7s], total [5.3s]/[11.1h], memory [5.7gb]-\>[5.7gb]/[5.8gb], all\_pools {[young] [1.4gb]-\>[1.4gb]/[1.4gb]}{[survivor] [157.8mb]-\>[167.2mb]/[191.3mb]}{[old] [4.1gb]-\>[4.1gb]/[4.1gb]}

when I look into stats I see the below values in GC section

timestamp: 1496287486120,  
uptime\_in\_millis: 56616425,  
mem: {  
heap\_used\_in\_bytes: 6140054600,  
heap\_used\_percent: 98,  
heap\_committed\_in\_bytes: 6241845248,  
heap\_max\_in\_bytes: 6241845248,  
non\_heap\_used\_in\_bytes: 125976480,  
non\_heap\_committed\_in\_bytes: 128987136,  
pools: {  
young: {  
used\_in\_bytes: 1605304320,  
max\_in\_bytes: 1605304320,  
peak\_used\_in\_bytes: 1605304320,  
peak\_max\_in\_bytes: 1605304320  
},  
survivor: {  
used\_in\_bytes: 99034656,  
max\_in\_bytes: 200605696,  
peak\_used\_in\_bytes: 200605696,  
peak\_max\_in\_bytes: 200605696  
},  
old: {  
used\_in\_bytes: 4435935232,  
max\_in\_bytes: 4435935232,  
peak\_used\_in\_bytes: 4435935232,  
peak\_max\_in\_bytes: 4435935232  
}  
}  
}

My question is why GC is not releasing memory and memory is growing continuously. Apart from indexing, no other activities being carried out on ES.

Also I use mapper attachment plugin in my ES as my docs contains attachments.

---

<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:** [June 29, 2017, 5:37am UTC](https://discuss.elastic.co/t/translogexception-failed-to-write-operation/87840/4 "2017-06-29T05:37:52Z")

</div>

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