Return-Path: Delivered-To: apmail-incubator-cassandra-commits-archive@minotaur.apache.org Received: (qmail 30195 invoked from network); 13 Nov 2009 21:29:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Nov 2009 21:29:04 -0000 Received: (qmail 32807 invoked by uid 500); 13 Nov 2009 21:29:04 -0000 Delivered-To: apmail-incubator-cassandra-commits-archive@incubator.apache.org Received: (qmail 32796 invoked by uid 500); 13 Nov 2009 21:29:04 -0000 Mailing-List: contact cassandra-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-dev@incubator.apache.org Delivered-To: mailing list cassandra-commits@incubator.apache.org Received: (qmail 32745 invoked by uid 99); 13 Nov 2009 21:29:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Nov 2009 21:29:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Nov 2009 21:29:00 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id AA8C1234C4D4 for ; Fri, 13 Nov 2009 13:28:39 -0800 (PST) Message-ID: <1374595894.1258147719697.JavaMail.jira@brutus> Date: Fri, 13 Nov 2009 21:28:39 +0000 (UTC) From: "Jonathan Ellis (JIRA)" To: cassandra-commits@incubator.apache.org Subject: [jira] Commented: (CASSANDRA-552) file descriptor leak in getKeyRange In-Reply-To: <843208535.1258142319561.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CASSANDRA-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12777670#action_12777670 ] Jonathan Ellis commented on CASSANDRA-552: ------------------------------------------ committed to trunk. 0.4 code is different enough that this patch will not apply. (It shouldn't be necessary, either, from my reading of the code, but if 0.4 does indeed leak FDs I don't think fixing it is worth the effort with 0.5 coming soon.) > file descriptor leak in getKeyRange > ----------------------------------- > > Key: CASSANDRA-552 > URL: https://issues.apache.org/jira/browse/CASSANDRA-552 > Project: Cassandra > Issue Type: Bug > Components: Core > Reporter: Jonathan Ellis > Assignee: Jonathan Ellis > Fix For: 0.5 > > Attachments: 552.patch > > > paste from mailing list: > Cassandra reported the following: > WARN [GMFD:1] 2009-11-12 16:07:24,961 MessagingService.java (line 393) > Exception was generated at : 11/12/2009 16:07:24 on thread GMFD:1 > Too many open files > java.net.SocketException: Too many open files > at sun.nio.ch.Net.socket0(Native Method) > at sun.nio.ch.Net.socket(Unknown Source) > at sun.nio.ch.DatagramChannelImpl.(Unknown Source) > at sun.nio.ch.SelectorProviderImpl.openDatagramChannel(Unknown > Source) > at java.nio.channels.DatagramChannel.open(Unknown Source) > at > org.apache.cassandra.net.UdpConnection.init(UdpConnection.java:49) > at > org.apache.cassandra.net.MessagingService.sendUdpOneWay(MessagingService.java:388) > at > org.apache.cassandra.gms.GossipDigestSynVerbHandler.doVerb(Gossiper.java:889) > at > org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:38) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown > Source) > at java.lang.Thread.run(Unknown Source) > Lsof reports that the java process has 65486 files open (I have ulimit > -n 65535 set in cassandra.in.sh). Many of the lsof entries include a > trailing '(deleted)' comment after the file path. > This appears to be similar to CASSANDRA-283. Anyone have a work around > for this? Would a forced GC take care of the ones marked deleted? > Here is my sample code to count the number of keys: > public class CClient > { > public static void main(String[] args) > throws TException, InvalidRequestException, UnavailableException, > UnsupportedEncodingException, NotFoundException > { > TTransport tr = new TSocket("localhost", 9160); > TProtocol proto = new TBinaryProtocol(tr); > Cassandra.Client client = new Cassandra.Client(proto); > tr.open(); > int count = 0; > int block = 1000; > String key = " "; > while (true) > { > List list = client.get_key_range("Keyspace1", > "Standard1", key, "~", block, ConsistencyLevel.ONE); > int size = list.size(); > if (size == 0) > break; > count += size; > key = list.get(size - 1) + '~'; > System.out.println("Count: " + Integer.toString(count)); > } > tr.close(); > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.