From user-return-10904-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Thu Dec 02 03:41:09 2010 Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 90533 invoked from network); 2 Dec 2010 03:41:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Dec 2010 03:41:09 -0000 Received: (qmail 209 invoked by uid 500); 2 Dec 2010 03:41:06 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 99943 invoked by uid 500); 2 Dec 2010 03:41:06 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 99935 invoked by uid 99); 2 Dec 2010 03:41:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Dec 2010 03:41:06 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ayazyan@gmail.com designates 209.85.216.44 as permitted sender) Received: from [209.85.216.44] (HELO mail-qw0-f44.google.com) (209.85.216.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Dec 2010 03:41:01 +0000 Received: by qwg5 with SMTP id 5so6770683qwg.31 for ; Wed, 01 Dec 2010 19:40:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=wPBj8rFGf80wyQNQnfNldGHqYjLml9+9u+88CDlTZTc=; b=J2A/8Hh4CKC3mm1fmhn+VdwN+kqtXXDMN/prF3TSvgHqnx2dDm97pa1SLk4wXcSBrC IJiabbBn1xfmE8j2I3AQyw6LMc0WqQVa8XnV7k1tMCM2o9PzVhdOdEKaZ2pzdYhZiHWy WUlgYvTaRUkVkgfKyjvGA4kx7K3Sya+0Tbzco= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=GDUei8wZQYn6vmo/c/APZlekYLNtkDtYXLqmu2w+hBISrPe5bDu2J/+iUtagzroVhY yO6HlOGVrVUdgVkF0ByvSeUhc2GGlTDmvaU5r1XVHQL39PoLdB/AXA8b3y2QOysumWuu nCTsi+XJimBJG8riSsxAzk7FyHCppK7iQT1Bo= Received: by 10.229.98.141 with SMTP id q13mr7735935qcn.73.1291261240633; Wed, 01 Dec 2010 19:40:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.235.210 with HTTP; Wed, 1 Dec 2010 19:40:19 -0800 (PST) In-Reply-To: References: From: Aram Ayazyan Date: Wed, 1 Dec 2010 19:40:19 -0800 Message-ID: Subject: Re: OutOfMemory exceptions w/ Cassandra 0.6.8 To: user@cassandra.apache.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Thanks a lot Jonathan! That seems to be it, since the exact same configuration w/ the same data starts up and works fine on a different server. -Aram On Wed, Dec 1, 2010 at 5:24 PM, Jonathan Ellis wrote: > Stack trace looks like an OS-level thread limit causing problems, not > actually memory. > > On Wed, Dec 1, 2010 at 7:05 PM, Aram Ayazyan wrote: >> Hi Aaron, >> >> OOM is happening both after the system has been running for a while as >> well as when I restart it afterwards. The only way to make it run >> after it has crashed, is to remove everything from data and commitlog >> directories. Unfortunately I don't have the original log from when >> cassandra crashed earlier, but might have some soon if another node >> crashes. >> >> This particular exception happened during start-up: >> ERROR [main] 2010-12-01 14:58:37,795 CassandraDaemon.java (line 242) >> Exception encountered during startup. >> java.lang.OutOfMemoryError: unable to create new native thread >> =A0 =A0 =A0 =A0at java.lang.Thread.start0(Native Method) >> =A0 =A0 =A0 =A0at java.lang.Thread.start(Thread.java:597) >> =A0 =A0 =A0 =A0at org.apache.cassandra.db.commitlog.PeriodicCommitLogExe= cutorService.(PeriodicCommitLogExecutorService.java:57) >> =A0 =A0 =A0 =A0at org.apache.cassandra.db.commitlog.PeriodicCommitLogExe= cutorService.(PeriodicCommitLogExecutorService.java:40) >> =A0 =A0 =A0 =A0at org.apache.cassandra.db.commitlog.CommitLog.(Com= mitLog.java:117) >> =A0 =A0 =A0 =A0at org.apache.cassandra.db.commitlog.CommitLog.(Com= mitLog.java:71) >> =A0 =A0 =A0 =A0at org.apache.cassandra.db.commitlog.CommitLog$CLHandle.<= clinit>(CommitLog.java:85) >> =A0 =A0 =A0 =A0at org.apache.cassandra.db.commitlog.CommitLog.instance(C= ommitLog.java:80) >> =A0 =A0 =A0 =A0at org.apache.cassandra.db.ColumnFamilyStore.maybeSwitchM= emtable(ColumnFamilyStore.java:469) >> =A0 =A0 =A0 =A0at org.apache.cassandra.db.ColumnFamilyStore.forceFlush(C= olumnFamilyStore.java:517) >> =A0 =A0 =A0 =A0at org.apache.cassandra.db.Table.flush(Table.java:431) >> =A0 =A0 =A0 =A0at org.apache.cassandra.db.commitlog.CommitLog.recover(Co= mmitLog.java:291) >> =A0 =A0 =A0 =A0at org.apache.cassandra.db.commitlog.CommitLog.recover(Co= mmitLog.java:172) >> =A0 =A0 =A0 =A0at org.apache.cassandra.thrift.CassandraDaemon.setup(Cass= andraDaemon.java:115) >> =A0 =A0 =A0 =A0at org.apache.cassandra.thrift.CassandraDaemon.main(Cassa= ndraDaemon.java:224) >> >> And here is the full GC log: http://pastebin.com/XGRSRcBd (all 21 >> seconds of it). >> >> Thank you, >> Aram >> >> On Wed, Dec 1, 2010 at 4:55 PM, Aaron Morton w= rote: >>> Do you have a log message for the OOM? And some GC messages around it? = Have >>> you tried watching the server with jconsole? >>> Is the OOM happening on system start or after it's been running ? Or bo= th? >>> Do you have any row/key caches? Cannot remember but is 0.6* has this bu= t >>> have you enabled the save cache feature? >>> Aaron >>> >>> On 02 Dec, 2010,at 01:28 PM, Aram Ayazyan wrote: >>> >>> Hi, >>> >>> We have a small cluster of 3 Cassandra servers running w/ full >>> replication. Every once in a while we get an OutOfMemory exception and >>> have to restart servers. Sometimes just restarting doesn=92t do it and >>> we have to clean the commitlog or data directory. >>> >>> We are running Cassandra 0.6.8. There is only 1 keyspace and 3 column >>> families. There are less than 1000 keys across all column families. >>> There is roughly 1 write request per second and 1 read request. Each >>> server is allocated 1GB. Size of all files in data directory of the >>> only column family is ~300MB. MemtableThroughputInMB is throttled way >>> down to 2 and BinaryMemtableThroughputInMB to 8 (w/ higher values we >>> were running out of memory extremely fast, this way it works for a >>> couple of days w/o crashing). >>> >>> Last time this issue happened, I didn=92t clear the commitlog/data >>> folders, enabled gc logging and restarted Cassandra. It crashes really >>> fast, but what is really strange is that it seems like it still has >>> plenty of memory when the error happens, last 3 lines from gc log: >>> 21.408: [GC 437098K->436592K(1046464K), 0.0986800 secs] >>> 21.520: [GC 453616K->453117K(1046464K), 0.0967770 secs] >>> 21.629: [GC 470141K->469436K(1046464K), 0.0383520 secs] >>> The full log is here: http://pastebin.com/XGRSRcBd >>> >>> I=92ve tried increasing the memory up to 1.5GB, but it still doesn=92t = start. >>> >>> Any ideas what might be the problem here? >>> >>> Thank you, >>> Aram >>> >> > > > > -- > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of Riptano, the source for professional Cassandra support > http://riptano.com >