When total size of the commit log directory exceedes above the 680 Mb it throws this exception
ERROR [COMMIT-LOG-ALLOCATOR] 2012-07-04 15:04:57,070 AbstractCassandraDaemon.java (line 134) Exception in thread Thread[COMMIT-LOG-ALLOCATOR,5,main]
java.io.IOError: java.io.IOException: Map failed
at org.apache.cassandra.db.commitlog.CommitLogSegment.<init>(CommitLogSegment.java:127)
at org.apache.cassandra.db.commitlog.CommitLogAllocator$3.run(CommitLogAllocator.java:203)
at org.apache.cassandra.db.commitlog.CommitLogAllocator$1.runMayThrow(CommitLogAllocator.java:95)
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Map failed
at sun.nio.ch.FileChannelImpl.map(Unknown Source)
at org.apache.cassandra.db.commitlog.CommitLogSegment.<init>(CommitLogSegment.java:119)
... 4 more
Caused by: java.lang.OutOfMemoryError: Map failed
at sun.nio.ch.FileChannelImpl.map0(Native Method)
... 6 more
ERROR [StorageServiceShutdownHook] 2012-07-04 15:04:57,075 AbstractCassandraDaemon.java (line 134) Exception in thread Thread[StorageServiceShutdownHook,5,main]
java.lang.NullPointerException
at org.apache.cassandra.gms.Gossiper.stop(Gossiper.java:1132)
at org.apache.cassandra.service.StorageService$2.runMayThrow(StorageService.java:489)
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
at java.lang.Thread.run(Unknown Source)
According to your operating system you should change the
-Xmxand-Xmsparameters of Java VM.I personally run cassandra on windows so I’ve changed
%CASSANDRA_HOME%/bin/cassandra.batlines 34 and 35 from1Gto100M.