From user-return-31113-archive-asf-public=cust-asf.ponee.io@commons.apache.org Fri Mar 2 00:47:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id ADC0718064D for ; Fri, 2 Mar 2018 00:47:03 +0100 (CET) Received: (qmail 25221 invoked by uid 500); 1 Mar 2018 23:47:02 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 25205 invoked by uid 99); 1 Mar 2018 23:47:01 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2018 23:47:01 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 123F8C15DC for ; Thu, 1 Mar 2018 23:47:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id srfCb9VzWIOP for ; Thu, 1 Mar 2018 23:46:59 +0000 (UTC) Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id C348F5F175 for ; Thu, 1 Mar 2018 23:46:58 +0000 (UTC) Received: by mail-oi0-f46.google.com with SMTP id c83so5867273oib.1 for ; Thu, 01 Mar 2018 15:46:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=hpUN+OH8SxQdbta6M4EJ/IVRAJ0mRuqLEpJG6RjVtDw=; b=qRXdiCoWkYUkSVFY81O9wxCToNajp985HArev6DnvBoXALQd61Q971ByeIPCxKWY/g SigHU0YNWl8DUD53rtBfE/ARzXrBm8uWyriA3AktrEheKK64ikkjh/EyalCuHRCBS58d +be6y/m4ij4oX23nkp71y2Ds8tDXPkRnFjLxVPONdSlEoiR+8rkEEdHpEYIBDlOdteGN Mc4P1oQMttmA5i8NVTIiesUKa4r4qzO1GI8J0hVqZSgVaFaMggngZzrM2dsrK52WP8/p WGn01PKAmpvg0Z2uHUBSLyYJ/sFa+4tytZNFwJAWXY+FBgIUwhf4rUO2yDopIWq66HvO SRzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=hpUN+OH8SxQdbta6M4EJ/IVRAJ0mRuqLEpJG6RjVtDw=; b=UAlbaxZuuefWhm5qxFJC4PFXuMqHEleCAMqa4LX0YpC/hGOP6A7HxauW/q19KGhk4W leDNCeGbCpY2KukkAoa6ixXfQl9XSRI0B/Rh5Ov8QvUPEG8iG+pKU4nezBFtwoPIM8DC wJ7j3JvjePT98ht8y+bVxFdj/sT1s0s7EQB1He0+lcxoxnoSWOHvDzblPu28NI8u2jRZ W5jm4tTIbbTzXYW+JXajPw29/DF5+xYXpHIJxBgTQnQQBQrlCufSCn/FUXr63+kNPmhF OESE8JbuCDpUsmHPgggc6puQ2IrpE2O4NkIJI2O7k09aKYuUoHvJeaxKF31TLDSoUKdM nvtg== X-Gm-Message-State: APf1xPCanv9khcELGgLWK/omAym0ca/ctVSlmgyqUrgw7TkNpoQihKI3 T6oY8OXga/wNZ4H1/HiJwBz7Jp9q6GVxdzHRDeUm X-Google-Smtp-Source: AG47ELuVmzm2nkqCBfO78C2Z0MFPA9XZmx+TWUj4EJAaz25WgD/821+u8KfZRIbnbU/2tM0Aorf+dMFm4nl2h3e8gAc= X-Received: by 10.202.172.138 with SMTP id v132mr2530795oie.320.1519948011843; Thu, 01 Mar 2018 15:46:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.16.114 with HTTP; Thu, 1 Mar 2018 15:46:51 -0800 (PST) In-Reply-To: <7258bf38-8d72-a00d-ef8c-4f301481e367@elyograg.org> References: <7258bf38-8d72-a00d-ef8c-4f301481e367@elyograg.org> From: Gary Gregory Date: Thu, 1 Mar 2018 16:46:51 -0700 Message-ID: Subject: Re: [DBCP] Connection pool not behaving as I expect To: Commons Users List Content-Type: multipart/alternative; boundary="001a113ce6d452b6830566627955" --001a113ce6d452b6830566627955 Content-Type: text/plain; charset="UTF-8" On Thu, Mar 1, 2018 at 3:33 PM, Shawn Heisey wrote: > We have been having some problems lately where our MySQL server hits the > max connection limit (600) and then everything breaks. When I look into > the problem, I find that our application servers have each made nearly a > hundred connections to the DB and haven't closed any of them for hours. > > I'm also using connection pooling in my programs, with the latest DBCP > version. Those servers don't open nearly as many connections, and have > idle eviction to keep the connection count down. But when the limit is > reached, these programs suddenly stop working too. > > Investigating these problems, I manage to get connected and kill off the > surplus of idle connections, and everything starts working. > > Today, a couple of days after the last incident, I realized that we > should *NOT* be having these problems -- because we're using connection > pooling. The application has open and idle connections to the DB server > ... so why is trying to open MORE connections (and obviously failing) > instead of using one of the perfectly good connections that's already > sitting there, unused? > > I'm writing here specifically for DBCP on my programs, so I know you > guys probably can't help with Tomcat's connection pooling ... but for > either case my question stands: Why isn't connection pooling doing its > job? > I do not think this is a question I, or anyone here, can answer generically. I can read between that lines that you must feel frustrated and I certainly empathize with that. I think you might want to debug your application and come up with some parameters for us to start helping you. A reproducible example is always best but I understand it might be hard to provide in this particular case. Gary > Thanks, > Shawn > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > > --001a113ce6d452b6830566627955--