<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>DataStax Support Forums &#187; Topic: Cassandra - java.lang.OutOfMemoryError: Java heap space</title>
		<link>http://www.datastax.com/support-forums/topic/cassandra-javalangoutofmemoryerror-java-heap-space</link>
		<description>Software, Support, and Training for Apache Cassandra</description>
		<language>en-US</language>
		<pubDate>Sat, 18 May 2013 14:13:53 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.3</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.datastax.com/support-forums/search.php</link>
		</textInput>
		<atom:link href="http://www.datastax.com/support-forums/rss/topic/cassandra-javalangoutofmemoryerror-java-heap-space" rel="self" type="application/rss+xml" />

		<item>
			<title>joaquin on "Cassandra - java.lang.OutOfMemoryError: Java heap space"</title>
			<link>http://www.datastax.com/support-forums/topic/cassandra-javalangoutofmemoryerror-java-heap-space#post-1443</link>
			<pubDate>Wed, 28 Mar 2012 17:05:30 +0000</pubDate>
			<dc:creator>joaquin</dc:creator>
			<guid isPermaLink="false">1443@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;1. Even though this article is for 0.7.x, it should help answer more thoroughly how memtable_throughput_in_mb and internal caches should be calculated:&#60;br /&#62;
&#60;a href=&#34;http://www.datastax.com/docs/0.7/operations/tuning#heap-sizing&#34; rel=&#34;nofollow&#34;&#62;http://www.datastax.com/docs/0.7/operations/tuning#heap-sizing&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;2. You can try by increasing the key cache capacity by 2x and see where that puts you. If you do this, make sure to do this in conjunction with step 1 to ensure your tune with this new key cache capacity.&#60;/p&#62;
&#60;p&#62;Also, try not to set your heap size to anything larger than 8GB. How much RAM is on your machine?&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Joaquin
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Cassandra - java.lang.OutOfMemoryError: Java heap space"</title>
			<link>http://www.datastax.com/support-forums/topic/cassandra-javalangoutofmemoryerror-java-heap-space#post-1424</link>
			<pubDate>Thu, 22 Mar 2012 16:25:26 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1424@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hi Jbellis,&#60;/p&#62;
&#60;p&#62;Thanks for your quick response.&#60;/p&#62;
&#60;p&#62;I'm trying to avoid cassandra OOM exception.&#60;/p&#62;
&#60;p&#62;heap size = memtable_throughput_in_mb * 3 * number of hot CFs + 1G + internal caches&#60;/p&#62;
&#60;p&#62;1. Based on your formula, we can calculate the heap size.&#60;br /&#62;
But Where can i get memtable_throughput_in_mb and internal caches To calculate the heap size?&#60;/p&#62;
&#60;p&#62;2.Below Key cache hit rate value is high. To improve the performance, How much i need to set by using setcachecapacity?     &#60;/p&#62;
&#60;p&#62;My cf statistics:&#60;br /&#62;
Keyspace: beacon&#60;br /&#62;
	Read Count: 58098&#60;br /&#62;
	Read Latency: 3.6910174704809116 ms.&#60;br /&#62;
	Write Count: 2875&#60;br /&#62;
	Write Latency: 0.015630956521739132 ms.&#60;br /&#62;
	Pending Tasks: 0&#60;br /&#62;
		Column Family: Alarms&#60;br /&#62;
		SSTable count: 2&#60;br /&#62;
		Space used (live): 5133969&#60;br /&#62;
		Space used (total): 5133969&#60;br /&#62;
		Memtable Columns Count: 0&#60;br /&#62;
		Memtable Data Size: 0&#60;br /&#62;
		Memtable Switch Count: 0&#60;br /&#62;
		Read Count: 68&#60;br /&#62;
		Read Latency: 9.724 ms.&#60;br /&#62;
		Write Count: 0&#60;br /&#62;
		Write Latency: NaN ms.&#60;br /&#62;
		Pending Tasks: 0&#60;br /&#62;
		Key cache capacity: 3264&#60;br /&#62;
		Key cache size: 6&#60;br /&#62;
		Key cache hit rate: 0.9491525423728814&#60;br /&#62;
		Row cache: disabled&#60;br /&#62;
		Compacted row minimum size: 0&#60;br /&#62;
		Compacted row maximum size: 0&#60;br /&#62;
		Compacted row mean size: 0&#60;/p&#62;
&#60;p&#62;Kindly provide your valuable feedback asap to improve the performance.&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Ramesh Kasi
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jbellis on "Cassandra - java.lang.OutOfMemoryError: Java heap space"</title>
			<link>http://www.datastax.com/support-forums/topic/cassandra-javalangoutofmemoryerror-java-heap-space#post-1387</link>
			<pubDate>Sun, 18 Mar 2012 20:21:17 +0000</pubDate>
			<dc:creator>jbellis</dc:creator>
			<guid isPermaLink="false">1387@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;The latest 0.6 release is 0.6.13: &#60;a href=&#34;http://archive.apache.org/dist/cassandra/0.6.13/&#34; rel=&#34;nofollow&#34;&#62;http://archive.apache.org/dist/cassandra/0.6.13/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Please follow the same troubleshooting guide I linked above and post your findings.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Cassandra - java.lang.OutOfMemoryError: Java heap space"</title>
			<link>http://www.datastax.com/support-forums/topic/cassandra-javalangoutofmemoryerror-java-heap-space#post-1385</link>
			<pubDate>Sun, 18 Mar 2012 18:40:03 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1385@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hello Bellis,&#60;/p&#62;
&#60;p&#62; Have found some info from the forums, after upgraded to cassandra 0.6.1 still the user facing the same problem when adding more rows/columns. So it means cassandra is not consistent? I think, Increasing the JVM Heap Space and upgrading to latest version will not resolve the above issue. Please give up the solution to resolve the issue  quickly...&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://permalink.gmane.org/gmane.comp.db.cassandra.user/5017&#34; rel=&#34;nofollow&#34;&#62;http://permalink.gmane.org/gmane.comp.db.cassandra.user/5017&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Thanks in advance...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jbellis on "Cassandra - java.lang.OutOfMemoryError: Java heap space"</title>
			<link>http://www.datastax.com/support-forums/topic/cassandra-javalangoutofmemoryerror-java-heap-space#post-1378</link>
			<pubDate>Thu, 15 Mar 2012 16:29:42 +0000</pubDate>
			<dc:creator>jbellis</dc:creator>
			<guid isPermaLink="false">1378@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Upgrade to the latest 0.6 release, then follow the advice here: &#60;a href=&#34;http://www.datastax.com/docs/0.6/troubleshooting/index#nodes-are-dying-with-oom-errors&#34; rel=&#34;nofollow&#34;&#62;http://www.datastax.com/docs/0.6/troubleshooting/index#nodes-are-dying-with-oom-errors&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Cassandra - java.lang.OutOfMemoryError: Java heap space"</title>
			<link>http://www.datastax.com/support-forums/topic/cassandra-javalangoutofmemoryerror-java-heap-space#post-1376</link>
			<pubDate>Thu, 15 Mar 2012 11:33:19 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1376@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;We are currently using cassandra ver 0.6.2 in Production.&#60;br /&#62;
The issue we are having is OOM (java.lang.OutOfMemoryError: Java heap space)&#60;br /&#62;
Below i have added the logs and cassandra configuration to identify the issue.&#60;/p&#62;
&#60;p&#62;Log:&#60;br /&#62;
--------&#60;/p&#62;
&#60;p&#62;INFO [COMPACTION-POOL:1] 2012-02-20 22:14:36,715 CompactionManager.java (line 246) Compacting [org.apache.cassandra.io.SSTableReader(path='/cassandra/data/beacon/Traps-4833-Data.db'),org.apache.cassandra.io.SSTableReader(path='/cassandra/data/beacon/Traps-5478-Data.db'),org.apache.cassandra.io.SSTableReader(path='/cassandra/data/beacon/Traps-6085-Data.db'),org.apache.cassandra.io.SSTableReader(path='/cassandra/data/beacon/Traps-7065-Data.db'),org.apache.cassandra.io.SSTableReader(path='/cassandra/data/beacon/Traps-11706-Data.db')]&#60;br /&#62;
 INFO [GC inspection] 2012-02-20 22:14:51,307 GCInspector.java (line 110) GC for ConcurrentMarkSweep: 1548 ms, 462469616 reclaimed leaving 576773008 used; max is 2277179392&#60;br /&#62;
 INFO [SSTABLE-CLEANUP-TIMER] 2012-02-20 22:15:01,310 SSTableDeletingReference.java (line 104) Deleted /cassandra/data/beacon/Alarms-13823-Data.db&#60;br /&#62;
 INFO [SSTABLE-CLEANUP-TIMER] 2012-02-20 22:15:01,311 SSTableDeletingReference.java (line 104) Deleted /cassandra/data/beacon/CircuitID-756-Data.db&#60;br /&#62;
 INFO [SSTABLE-CLEANUP-TIMER] 2012-02-20 22:15:01,311 SSTableDeletingReference.java (line 104) Deleted /cassandra/data/beacon/CircuitID-757-Data.db&#60;br /&#62;
 INFO [SSTABLE-CLEANUP-TIMER] 2012-02-20 22:15:01,312 SSTableDeletingReference.java (line 104) Deleted /cassandra/data/beacon/CircuitID-755-Data.db&#60;br /&#62;
 INFO [SSTABLE-CLEANUP-TIMER] 2012-02-20 22:15:01,312 SSTableDeletingReference.java (line 104) Deleted /cassandra/data/beacon/Alarms-13824-Data.db&#60;br /&#62;
 INFO [SSTABLE-CLEANUP-TIMER] 2012-02-20 22:15:01,312 SSTableDeletingReference.java (line 104) Deleted /cassandra/data/beacon/Alarms-13825-Data.db&#60;br /&#62;
 INFO [SSTABLE-CLEANUP-TIMER] 2012-02-20 22:15:01,312 SSTableDeletingReference.java (line 104) Deleted /cassandra/data/beacon/AlertDate-13806-Data.db&#60;br /&#62;
 INFO [SSTABLE-CLEANUP-TIMER] 2012-02-20 22:15:01,313 SSTableDeletingReference.java (line 104) Deleted /cassandra/data/beacon/AlertDate-13805-Data.db&#60;br /&#62;
 INFO [SSTABLE-CLEANUP-TIMER] 2012-02-20 22:15:01,318 SSTableDeletingReference.java (line 104) Deleted /cassandra/data/beacon/Alarms-13822-Data.db&#60;br /&#62;
 INFO [SSTABLE-CLEANUP-TIMER] 2012-02-20 22:15:01,321 SSTableDeletingReference.java (line 104) Deleted /cassandra/data/beacon/AlertDate-13803-Data.db&#60;br /&#62;
 INFO [SSTABLE-CLEANUP-TIMER] 2012-02-20 22:15:01,321 SSTableDeletingReference.java (line 104) Deleted /cassandra/data/beacon/CircuitID-758-Data.db&#60;br /&#62;
 INFO [SSTABLE-CLEANUP-TIMER] 2012-02-20 22:15:01,321 SSTableDeletingReference.java (line 104) Deleted /cassandra/data/beacon/AlertDate-13804-Data.db&#60;br /&#62;
 INFO [GC inspection] 2012-02-20 22:16:08,795 GCInspector.java (line 110) GC for ConcurrentMarkSweep: 3650 ms, 125120 reclaimed leaving 1917886152 used; max is 2277179392&#60;br /&#62;
ERROR [COMPACTION-POOL:1] 2012-02-20 22:16:08,798 DebuggableThreadPoolExecutor.java (line 94) Error in executor futuretask&#60;br /&#62;
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space&#60;br /&#62;
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)&#60;br /&#62;
	at java.util.concurrent.FutureTask.get(FutureTask.java:83)&#60;br /&#62;
	at org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor.afterExecute(DebuggableThreadPoolExecutor.java:86)&#60;br /&#62;
	at org.apache.cassandra.db.CompactionManager$CompactionExecutor.afterExecute(CompactionManager.java:582)&#60;br /&#62;
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:887)&#60;br /&#62;
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)&#60;br /&#62;
	at java.lang.Thread.run(Thread.java:619)&#60;br /&#62;
Caused by: java.lang.OutOfMemoryError: Java heap space&#60;br /&#62;
	at java.util.Arrays.copyOf(Arrays.java:2786)&#60;br /&#62;
	at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)&#60;br /&#62;
	at java.io.DataOutputStream.write(DataOutputStream.java:90)&#60;br /&#62;
	at java.io.FilterOutputStream.write(FilterOutputStream.java:80)&#60;br /&#62;
	at org.apache.cassandra.db.ColumnSerializer.writeName(ColumnSerializer.java:39)&#60;br /&#62;
	at org.apache.cassandra.db.ColumnSerializer.serialize(ColumnSerializer.java:61)&#60;br /&#62;
	at org.apache.cassandra.db.SuperColumnSerializer.serialize(SuperColumn.java:311)&#60;br /&#62;
	at org.apache.cassandra.db.SuperColumnSerializer.serialize(SuperColumn.java:284)&#60;br /&#62;
	at org.apache.cassandra.db.ColumnFamilySerializer.serializeForSSTable(ColumnFamilySerializer.java:87)&#60;br /&#62;
	at org.apache.cassandra.db.ColumnFamilySerializer.serializeWithIndexes(ColumnFamilySerializer.java:99)&#60;br /&#62;
	at org.apache.cassandra.io.CompactionIterator.getReduced(CompactionIterator.java:131)&#60;br /&#62;
	at org.apache.cassandra.io.CompactionIterator.getReduced(CompactionIterator.java:41)&#60;br /&#62;
	at org.apache.cassandra.utils.ReducingIterator.computeNext(ReducingIterator.java:73)&#60;br /&#62;
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:135)&#60;br /&#62;
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:130)&#60;br /&#62;
	at org.apache.commons.collections.iterators.FilterIterator.setNextObject(FilterIterator.java:183)&#60;br /&#62;
	at org.apache.commons.collections.iterators.FilterIterator.hasNext(FilterIterator.java:94)&#60;br /&#62;
	at org.apache.cassandra.db.CompactionManager.doCompaction(CompactionManager.java:299)&#60;br /&#62;
	at org.apache.cassandra.db.CompactionManager$1.call(CompactionManager.java:102)&#60;br /&#62;
	at org.apache.cassandra.db.CompactionManager$1.call(CompactionManager.java:83)&#60;br /&#62;
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)&#60;br /&#62;
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)&#60;br /&#62;
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)&#60;br /&#62;
	... 2 more&#60;br /&#62;
 INFO [COMPACTION-POOL:1] 2012-02-20 22:16:08,798 CompactionManager.java (line 246) Compacting [org.apache.cassandra.io.SSTableReader(path='/cassandra/data/beacon/AlertGroups-13840-Data.db'),org.apache.cassandra.io.SSTableReader(path='/cassandra/data/beacon/AlertGroups-13841-Data.db'),org.apache.cassandra.io.SSTableReader(path='/cassandra/data/beacon/AlertGroups-13842-Data.db'),org.apache.cassandra.io.SSTableReader(path='/cassandra/data/beacon/AlertGroups-13843-Data.db')]&#60;br /&#62;
 INFO [COMPACTION-POOL:1] 2012-02-20 22:16:08,913 CompactionManager.java (line 326) Compacted to /cassandra/data/beacon/AlertGroups-13844-Data.db.  1863395/1575561 bytes for 2554 keys.  Time: 114ms.&#60;br /&#62;
 INFO [FLUSH-TIMER] 2012-02-20 23:14:33,889 ColumnFamilyStore.java (line 357) ActiveGroups has reached its threshold; switching in a fresh Memtable at CommitLogContext(file='/var/cassandra/commitlog/CommitLog-1329745139372.log', position=2624553)&#60;/p&#62;
&#60;p&#62;cassandra configuration:&#60;br /&#62;
------------------------&#60;/p&#62;
&#60;p&#62;# Arguments to pass to the JVM&#60;br /&#62;
JVM_OPTS=&#34; \&#60;br /&#62;
        -ea \&#60;br /&#62;
        -Xms256M \&#60;br /&#62;
        -Xmx6G \&#60;br /&#62;
        -XX:+UseParNewGC \&#60;br /&#62;
        -XX:+UseConcMarkSweepGC \&#60;br /&#62;
        -XX:+CMSParallelRemarkEnabled \&#60;br /&#62;
        -XX:SurvivorRatio=8 \&#60;br /&#62;
        -XX:MaxTenuringThreshold=1 \&#60;br /&#62;
        -XX:+HeapDumpOnOutOfMemoryError \&#60;br /&#62;
        -Dcom.sun.management.jmxremote.port=8080 \&#60;br /&#62;
        -Dcom.sun.management.jmxremote.ssl=false \&#60;br /&#62;
        -Dcom.sun.management.jmxremote.authenticate=false&#34;&#60;/p&#62;
&#60;p&#62;Please advice me how to resolve this issue.&#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
Ramesh Kasi
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
