# Seeing java.lang.OutOfMemoryError after upgrade from 0.17.4 to 0.17.8 in client

**URL:** <https://discuss.elastic.co/t/seeing-java-lang-outofmemoryerror-after-upgrade-from-0-17-4-to-0-17-8-in-client/5678>\
**Category:** Elasticsearch\
**Created:** [October 25, 2011, 4:08pm UTC](https://discuss.elastic.co/t/seeing-java-lang-outofmemoryerror-after-upgrade-from-0-17-4-to-0-17-8-in-client/5678 "2011-10-25T16:08:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![danpolites](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danpolites/32/2136_2.png) [@danpolites](https://discuss.elastic.co/u/danpolites)\
**Post date:** [October 25, 2011, 4:08pm UTC](https://discuss.elastic.co/t/seeing-java-lang-outofmemoryerror-after-upgrade-from-0-17-4-to-0-17-8-in-client/5678/1 "2011-10-25T16:08:58Z")

</div>

We have a client node running in a Grails application that is hosted  
in a Tomcat instance. We have recently started seeing this error after  
the upgrade to 0.17.8. Thoughts?

Here is the JAVA\_OPTS configuration that we have been using. This  
hasn't changed in awhile.

export JAVA\_OPTS="-jvm server -XX:+DisableExplicitGC -XX:  
+UseConcMarkSweepGC -XX:ParallelGCThreads=20 -XX:+UseParNewGC -  
XX:MaxPermSize=160m -XX:PermSize=160m -XX:SurvivorRatio=8 -  
XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -Xms2048m -  
Xmx2048m"

Here is the error message that we get in the Tomcat logs.

Exception in thread "elasticsearch[cached]-pool-1-thread-32"  
java.lang.OutOfMemoryError: Java heap space  
at  
org.elasticsearch.common.compress.lzf.BufferRecycler.allocEncodingBuffer(BufferRecycler.java:  
80)  
at  
org.elasticsearch.common.compress.lzf.ChunkEncoder.(ChunkEncoder.java:  
70)  
at  
org.elasticsearch.common.io.stream.LZFStreamOutput.(LZFStreamOutput.java:  
47)  
at  
org.elasticsearch.common.io.stream.CachedStreamOutput.newEntry(CachedStreamOutput.java:  
37)  
at  
org.elasticsearch.common.io.stream.CachedStreamOutput.popEntry(CachedStreamOutput.java:  
114)  
at  
org.elasticsearch.transport.netty.NettyTransport.sendRequest(NettyTransport.java:  
457)  
at  
org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:  
178)  
at  
org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:  
165)  
at  
org.elasticsearch.discovery.zen.membership.MembershipAction.sendJoinRequest(MembershipAction.java:  
80)  
at org.elasticsearch.discovery.zen.ZenDiscovery  
$MasterNodeFailureListener.onDisconnectedFromMaster(ZenDiscovery.java:  
638)  
at org.elasticsearch.discovery.zen.fd.MasterFaultDetection  
$1.run(MasterFaultDetection.java:226)  
at java.util.concurrent.ThreadPoolExecutor  
$Worker.runTask(ThreadPoolExecutor.java:886)  
at java.util.concurrent.ThreadPoolExecutor  
$Worker.run(ThreadPoolExecutor.java:908)  
at java.lang.Thread.run(Thread.java:662)  
Exception in thread "elasticsearch[cached]-pool-1-thread-38"  
java.lang.OutOfMemoryError: Java heap space

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [October 25, 2011, 4:58pm UTC](https://discuss.elastic.co/t/seeing-java-lang-outofmemoryerror-after-upgrade-from-0-17-4-to-0-17-8-in-client/5678/2 "2011-10-25T16:58:47Z")

</div>

Do you have a heap dump somewhere, so I can look at?

On Tue, Oct 25, 2011 at 6:08 PM, danpolites [dpolites@gmail.com](mailto:dpolites@gmail.com) wrote:

> We have a client node running in a Grails application that is hosted  
> in a Tomcat instance. We have recently started seeing this error after  
> the upgrade to 0.17.8. Thoughts?
> 
> Here is the JAVA\_OPTS configuration that we have been using. This  
> hasn't changed in awhile.
> 
> export JAVA\_OPTS="-jvm server -XX:+DisableExplicitGC -XX:  
> +UseConcMarkSweepGC -XX:ParallelGCThreads=20 -XX:+UseParNewGC -  
> XX:MaxPermSize=160m -XX:PermSize=160m -XX:SurvivorRatio=8 -  
> XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -Xms2048m -  
> Xmx2048m"
> 
> Here is the error message that we get in the Tomcat logs.
> 
> Exception in thread "elasticsearch[cached]-pool-1-thread-32"  
> java.lang.OutOfMemoryError: Java heap space  
> at
> 
> org.elasticsearch.common.compress.lzf.BufferRecycler.allocEncodingBuffer(BufferRecycler.java:  
> 80)  
> at
> 
> org.elasticsearch.common.compress.lzf.ChunkEncoder.(ChunkEncoder.java:  
> 70)  
> at
> 
> org.elasticsearch.common.io.stream.LZFStreamOutput.(LZFStreamOutput.java:  
> 47)  
> at
> 
> org.elasticsearch.common.io.stream.CachedStreamOutput.newEntry(CachedStreamOutput.java:  
> 37)  
> at
> 
> org.elasticsearch.common.io.stream.CachedStreamOutput.popEntry(CachedStreamOutput.java:  
> 114)  
> at
> 
> org.elasticsearch.transport.netty.NettyTransport.sendRequest(NettyTransport.java:  
> 457)  
> at
> 
> org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:  
> 178)  
> at
> 
> org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:  
> 165)  
> at
> 
> org.elasticsearch.discovery.zen.membership.MembershipAction.sendJoinRequest(MembershipAction.java:  
> 80)  
> at org.elasticsearch.discovery.zen.ZenDiscovery  
> $MasterNodeFailureListener.onDisconnectedFromMaster(ZenDiscovery.java:  
> 638)  
> at org.elasticsearch.discovery.zen.fd.MasterFaultDetection  
> $1.run(MasterFaultDetection.java:226)  
> at java.util.concurrent.ThreadPoolExecutor  
> $Worker.runTask(ThreadPoolExecutor.java:886)  
> at java.util.concurrent.ThreadPoolExecutor  
> $Worker.run(ThreadPoolExecutor.java:908)  
> at java.lang.Thread.run(Thread.java:662)  
> Exception in thread "elasticsearch[cached]-pool-1-thread-38"  
> java.lang.OutOfMemoryError: Java heap space

---

<div class="post-metadata">

**Author:** ![danpolites](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danpolites/32/2136_2.png) [@danpolites](https://discuss.elastic.co/u/danpolites)\
**Post date:** [October 26, 2011, 3:21am UTC](https://discuss.elastic.co/t/seeing-java-lang-outofmemoryerror-after-upgrade-from-0-17-4-to-0-17-8-in-client/5678/3 "2011-10-26T03:21:57Z")

</div>

I do not. If I see it again, I'll get one before I reboot.

On Oct 25, 12:58 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> Do you have a heap dump somewhere, so I can look at?
> 
> On Tue, Oct 25, 2011 at 6:08 PM, danpolites [dpoli...@gmail.com](mailto:dpoli...@gmail.com) wrote:
> 
> > We have a client node running in a Grails application that is hosted  
> > in a Tomcat instance. We have recently started seeing this error after  
> > the upgrade to 0.17.8. Thoughts?
> 
> > Here is the JAVA\_OPTS configuration that we have been using. This  
> > hasn't changed in awhile.
> 
> > export JAVA\_OPTS="-jvm server -XX:+DisableExplicitGC -XX:  
> > +UseConcMarkSweepGC -XX:ParallelGCThreads=20 -XX:+UseParNewGC -  
> > XX:MaxPermSize=160m -XX:PermSize=160m -XX:SurvivorRatio=8 -  
> > XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -Xms2048m -  
> > Xmx2048m"
> 
> > Here is the error message that we get in the Tomcat logs.
> 
> > Exception in thread "elasticsearch[cached]-pool-1-thread-32"  
> > java.lang.OutOfMemoryError: Java heap space  
> > at
> 
> > org.elasticsearch.common.compress.lzf.BufferRecycler.allocEncodingBuffer(Bu fferRecycler.java:  
> > 80)  
> > at
> 
> > org.elasticsearch.common.compress.lzf.ChunkEncoder.(ChunkEncoder.java :  
> > 70)  
> > at
> 
> > org.elasticsearch.common.io.stream.LZFStreamOutput.(LZFStreamOutput.j ava:  
> > 47)  
> > at
> 
> > org.elasticsearch.common.io.stream.CachedStreamOutput.newEntry(CachedStream Output.java:  
> > 37)  
> > at
> 
> > org.elasticsearch.common.io.stream.CachedStreamOutput.popEntry(CachedStream Output.java:  
> > 114)  
> > at
> 
> > org.elasticsearch.transport.netty.NettyTransport.sendRequest(NettyTransport .java:  
> > 457)  
> > at
> 
> > org.elasticsearch.transport.TransportService.sendRequest(TransportService.j ava:  
> > 178)  
> > at
> 
> > org.elasticsearch.transport.TransportService.sendRequest(TransportService.j ava:  
> > 165)  
> > at
> 
> > org.elasticsearch.discovery.zen.membership.MembershipAction.sendJoinRequest (MembershipAction.java:  
> > 80)  
> > at org.elasticsearch.discovery.zen.ZenDiscovery  
> > $MasterNodeFailureListener.onDisconnectedFromMaster(ZenDiscovery.java:  
> > 638)  
> > at org.elasticsearch.discovery.zen.fd.MasterFaultDetection  
> > $1.run(MasterFaultDetection.java:226)  
> > at java.util.concurrent.ThreadPoolExecutor  
> > $Worker.runTask(ThreadPoolExecutor.java:886)  
> > at java.util.concurrent.ThreadPoolExecutor  
> > $Worker.run(ThreadPoolExecutor.java:908)  
> > at java.lang.Thread.run(Thread.java:662)  
> > Exception in thread "elasticsearch[cached]-pool-1-thread-38"  
> > java.lang.OutOfMemoryError: Java heap space

---

<div class="post-metadata">

**Author:** ![Thomas\_Peuss](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@Thomas\_Peuss](https://discuss.elastic.co/u/Thomas_Peuss)\
**Post date:** [October 26, 2011, 9:12am UTC](https://discuss.elastic.co/t/seeing-java-lang-outofmemoryerror-after-upgrade-from-0-17-4-to-0-17-8-in-client/5678/4 "2011-10-26T09:12:02Z")

</div>

You can set the JVM parameter -XX:-HeapDumpOnOutOfMemoryError to get  
an automatic heap dump. With -XX:HeapDumpPath=... you can control  
where it gets written.

On 26 Okt., 05:21, danpolites [dpoli...@gmail.com](mailto:dpoli...@gmail.com) wrote:

> I do not. If I see it again, I'll get one before I reboot.
> 
> On Oct 25, 12:58 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > Do you have a heap dump somewhere, so I can look at?
> 
> > On Tue, Oct 25, 2011 at 6:08 PM, danpolites [dpoli...@gmail.com](mailto:dpoli...@gmail.com) wrote:
> > 
> > > We have a client node running in a Grails application that is hosted  
> > > in a Tomcat instance. We have recently started seeing this error after  
> > > the upgrade to 0.17.8. Thoughts?
> 
> > > Here is the JAVA\_OPTS configuration that we have been using. This  
> > > hasn't changed in awhile.
> 
> > > export JAVA\_OPTS="-jvm server -XX:+DisableExplicitGC -XX:  
> > > +UseConcMarkSweepGC -XX:ParallelGCThreads=20 -XX:+UseParNewGC -  
> > > XX:MaxPermSize=160m -XX:PermSize=160m -XX:SurvivorRatio=8 -  
> > > XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -Xms2048m -  
> > > Xmx2048m"
> 
> > > Here is the error message that we get in the Tomcat logs.
> 
> > > Exception in thread "elasticsearch[cached]-pool-1-thread-32"  
> > > java.lang.OutOfMemoryError: Java heap space  
> > > at
> 
> > > org.elasticsearch.common.compress.lzf.BufferRecycler.allocEncodingBuffer(Bu fferRecycler.java:  
> > > 80)  
> > > at
> 
> > > org.elasticsearch.common.compress.lzf.ChunkEncoder.(ChunkEncoder.java :  
> > > 70)  
> > > at
> 
> > > org.elasticsearch.common.io.stream.LZFStreamOutput.(LZFStreamOutput.j ava:  
> > > 47)  
> > > at
> 
> > > org.elasticsearch.common.io.stream.CachedStreamOutput.newEntry(CachedStream Output.java:  
> > > 37)  
> > > at
> 
> > > org.elasticsearch.common.io.stream.CachedStreamOutput.popEntry(CachedStream Output.java:  
> > > 114)  
> > > at
> 
> > > org.elasticsearch.transport.netty.NettyTransport.sendRequest(NettyTransport .java:  
> > > 457)  
> > > at
> 
> > > org.elasticsearch.transport.TransportService.sendRequest(TransportService.j ava:  
> > > 178)  
> > > at
> 
> > > org.elasticsearch.transport.TransportService.sendRequest(TransportService.j ava:  
> > > 165)  
> > > at
> 
> > > org.elasticsearch.discovery.zen.membership.MembershipAction.sendJoinRequest (MembershipAction.java:  
> > > 80)  
> > > at org.elasticsearch.discovery.zen.ZenDiscovery  
> > > $MasterNodeFailureListener.onDisconnectedFromMaster(ZenDiscovery.java:  
> > > 638)  
> > > at org.elasticsearch.discovery.zen.fd.MasterFaultDetection  
> > > $1.run(MasterFaultDetection.java:226)  
> > > at java.util.concurrent.ThreadPoolExecutor  
> > > $Worker.runTask(ThreadPoolExecutor.java:886)  
> > > at java.util.concurrent.ThreadPoolExecutor  
> > > $Worker.run(ThreadPoolExecutor.java:908)  
> > > at java.lang.Thread.run(Thread.java:662)  
> > > Exception in thread "elasticsearch[cached]-pool-1-thread-38"  
> > > java.lang.OutOfMemoryError: Java heap space

---

<div class="post-metadata">

**Author:** ![ABC](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@ABC](https://discuss.elastic.co/u/ABC)\
**Post date:** [January 7, 2013, 2:47pm UTC](https://discuss.elastic.co/t/seeing-java-lang-outofmemoryerror-after-upgrade-from-0-17-4-to-0-17-8-in-client/5678/5 "2013-01-07T14:47:56Z")

</div>

Guys,  
Was this issue resolved in the end? I have started getting the same  
exception in the logs. any known solutions on solaris?  
thanks!

On Wednesday, 26 October 2011 10:12:02 UTC+1, Thomas Peuss wrote:

> You can set the JVM parameter -XX:-HeapDumpOnOutOfMemoryError to get  
> an automatic heap dump. With -XX:HeapDumpPath=... you can control  
> where it gets written.
> 
> On 26 Okt., 05:21, danpolites [dpoli...@gmail.com](mailto:dpoli...@gmail.com) wrote:
> 
> > I do not. If I see it again, I'll get one before I reboot.
> > 
> > On Oct 25, 12:58 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > 
> > > Do you have a heap dump somewhere, so I can look at?
> > 
> > > On Tue, Oct 25, 2011 at 6:08 PM, danpolites [dpoli...@gmail.com](mailto:dpoli...@gmail.com)  
> > > wrote:
> > > 
> > > > We have a client node running in a Grails application that is hosted  
> > > > in a Tomcat instance. We have recently started seeing this error  
> > > > after  
> > > > the upgrade to 0.17.8. Thoughts?
> > 
> > > > Here is the JAVA\_OPTS configuration that we have been using. This  
> > > > hasn't changed in awhile.
> > 
> > > > export JAVA\_OPTS="-jvm server -XX:+DisableExplicitGC -XX:  
> > > > +UseConcMarkSweepGC -XX:ParallelGCThreads=20 -XX:+UseParNewGC -  
> > > > XX:MaxPermSize=160m -XX:PermSize=160m -XX:SurvivorRatio=8 -  
> > > > XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -Xms2048m -  
> > > > Xmx2048m"
> > 
> > > > Here is the error message that we get in the Tomcat logs.
> > 
> > > > Exception in thread "elasticsearch[cached]-pool-1-thread-32"  
> > > > java.lang.OutOfMemoryError: Java heap space  
> > > > at
> > 
> > > >
> 
> org.elasticsearch.common.compress.lzf.BufferRecycler.allocEncodingBuffer(Bu  
> fferRecycler.java:
> 
> > > > 1. 
> > > > 
> > > > at
> > 
> > > >
> 
> org.elasticsearch.common.compress.lzf.ChunkEncoder.(ChunkEncoder.java  
> :
> 
> > > > 1. 
> > > > 
> > > > at
> > 
> > > >
> 
> org.elasticsearch.common.io.stream.LZFStreamOutput.(LZFStreamOutput.j  
> ava:
> 
> > > > 1. 
> > > > 
> > > > at
> > 
> > > >
> 
> org.elasticsearch.common.io.stream.CachedStreamOutput.newEntry(CachedStream  
> Output.java:
> 
> > > > 1. 
> > > > 
> > > > at
> > 
> > > >
> 
> org.elasticsearch.common.io.stream.CachedStreamOutput.popEntry(CachedStream  
> Output.java:
> 
> > > > 1. 
> > > > 
> > > > at
> > 
> > > >
> 
> org.elasticsearch.transport.netty.NettyTransport.sendRequest(NettyTransport  
> .java:
> 
> > > > 1. 
> > > > 
> > > > at
> > 
> > > >
> 
> org.elasticsearch.transport.TransportService.sendRequest(TransportService.j  
> ava:
> 
> > > > 1. 
> > > > 
> > > > at
> > 
> > > >
> 
> org.elasticsearch.transport.TransportService.sendRequest(TransportService.j  
> ava:
> 
> > > > 1. 
> > > > 
> > > > at
> > 
> > > >
> 
> org.elasticsearch.discovery.zen.membership.MembershipAction.sendJoinRequest  
> (MembershipAction.java:
> 
> > > > 1. 
> > > > 
> > > > at org.elasticsearch.discovery.zen.ZenDiscovery
> 
> $MasterNodeFailureListener.onDisconnectedFromMaster(ZenDiscovery.java:
> 
> > > > 1. 
> > > > 
> > > > at org.elasticsearch.discovery.zen.fd.MasterFaultDetection  
> > > > $1.run(MasterFaultDetection.java:226)  
> > > > at java.util.concurrent.ThreadPoolExecutor  
> > > > $Worker.runTask(ThreadPoolExecutor.java:886)  
> > > > at java.util.concurrent.ThreadPoolExecutor  
> > > > $Worker.run(ThreadPoolExecutor.java:908)  
> > > > at java.lang.Thread.run(Thread.java:662)  
> > > > Exception in thread "elasticsearch[cached]-pool-1-thread-38"  
> > > > java.lang.OutOfMemoryError: Java heap space

--

---

<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:57am UTC](https://discuss.elastic.co/t/seeing-java-lang-outofmemoryerror-after-upgrade-from-0-17-4-to-0-17-8-in-client/5678/6 "2017-07-06T02:57:33Z")

</div>


