Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 39099111A0 for ; Sun, 10 Aug 2014 01:50:50 +0000 (UTC) Received: (qmail 66942 invoked by uid 500); 10 Aug 2014 01:50:47 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 66898 invoked by uid 500); 10 Aug 2014 01:50:47 -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 66888 invoked by uid 99); 10 Aug 2014 01:50:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Aug 2014 01:50:47 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of redmumba@gmail.com designates 209.85.220.47 as permitted sender) Received: from [209.85.220.47] (HELO mail-pa0-f47.google.com) (209.85.220.47) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Aug 2014 01:50:22 +0000 Received: by mail-pa0-f47.google.com with SMTP id kx10so9063717pab.6 for ; Sat, 09 Aug 2014 18:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type; bh=KINkks9pJsIcFDx0sP/novUK9QS6SeBfp30lQc9d6C4=; b=WGB19REt070CydTG7hwcv/IeGKwTFLBw+Ck4OiEfPEGA1cX7ax7F1qT11oVoWaVpsi lHvCJXnkJMhBmhVVED7lVvTt7aO9wAwr5Qhm1y0s0MW+0mPA6mhPX3G7odWllpJfjkFx pXgsyutisISxoihpEFujhNyt0I7Oq4TK1Ixyi00YFdxpHSEkMEY2dGJGnYHDLt+izcCz lnP3rhDds2XjRFgGsIEDY8oi2yS3wujao08QravhGPgi3MCYHFtgXYXTIiiTlHbn6Lu+ 6LL/vXRV5AxbyfKhfDYoUCjrkqLUg+gSIXRHtFknVeg5y7CAjhhAWLzM1kjD4r0ZzQKr kpVg== X-Received: by 10.68.225.105 with SMTP id rj9mr33370380pbc.108.1407635420567; Sat, 09 Aug 2014 18:50:20 -0700 (PDT) Received: from amcfague-mac (c-24-19-235-162.hsd1.wa.comcast.net. [24.19.235.162]) by mx.google.com with ESMTPSA id ei1sm10951982pdb.20.2014.08.09.18.50.19 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 09 Aug 2014 18:50:19 -0700 (PDT) Date: Sat, 9 Aug 2014 18:50:18 -0700 From: Andrew To: Jonathan Haddad , user@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: Re: too many open files X-Mailer: Airmail (247) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="53e6cfdb_109cf92e_97fe" X-Virus-Checked: Checked by ClamAV on apache.org --53e6cfdb_109cf92e_97fe Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Yes, that was the problem=E2=80=94I actually knew better, but had briefly= overlooked this that when I was doing some refactoring. =C2=A0I am not t= he OP (although he himself realized his mistake). if you follow the thread, I was explaining that the Datastax Java driver = allowed me to basically open a significantly large number of connections = until the Cassandra server ran out of connections. =C2=A0Tyler was asking= for a repro case and requesting that I file a possible bug, if this was = something that SHOULD have been caught on the client side (via the max co= nnections client configuration). Andrew On August 9, 2014 at 2:17:57 PM, Jonathan Haddad (jon=40jonhaddad.com) wr= ote: It really doesn't need to be this complicated. You only need 1 =20 session per application. It's thread safe and manages the connection =20 pool for you. =20 http://www.datastax.com/drivers/java/2.0/com/datastax/driver/core/Session= .html =20 On Sat, Aug 9, 2014 at 1:29 PM, Kevin Burton wrote= : =20 > Another idea to detect this is when the number of open sessions exceeds= the =20 > number of threads. =20 > =20 > On Aug 9, 2014 10:59 AM, =22Andrew=22 wrote: =20 >> =20 >> I just had a generator that (in the incorrect way) had a cluster as a = =20 >> member variable, and would call .connect() repeatedly. I =5Fthought=5F= , =20 >> incorrectly, that the Session was thread unsafe, and so I should reque= st a =20 >> separate Session each time=E2=80=94obviously wrong in hind sight. =20 >> =20 >> There was no special logic; I had a restriction of about 128 connectio= ns =20 >> per host, but the connections were in the 100s of thousands, like the = OP =20 >> mentioned. Again, I=E2=80=99ll see about reproducing it on Monday, but= just wanted =20 >> the repro steps (overall) to live somewhere in case I can=E2=80=99t. := ) =20 >> =20 >> Andrew =20 >> =20 >> On August 8, 2014 at 4:08:50 PM, Tyler Hobbs (tyler=40datastax.com) wr= ote: =20 >> =20 >> =20 >> On =46ri, Aug 8, 2014 at 5:52 PM, Redmumba wrot= e: =20 >>> =20 >>> Just to chime in, I also ran into this issue when I was migrating to = the =20 >>> Datastax client. Instead of reusing the session, I was opening a new = session =20 >>> each time. =46or some reason, even though I was still closing the ses= sion on =20 >>> the client side, I was getting the same error. =20 >> =20 >> =20 >> Which driver=3F If you can still reproduce this, would you mind openin= g a =20 >> ticket=3F (https://datastax-oss.atlassian.net/secure/BrowseProjects.js= pa=23all) =20 >> =20 >> =20 >> -- =20 >> Tyler Hobbs =20 >> DataStax =20 -- =20 Jon Haddad =20 http://www.rustyrazorblade.com =20 skype: rustyrazorblade =20 --53e6cfdb_109cf92e_97fe Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline