Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5319B200D34 for ; Fri, 3 Nov 2017 13:32:28 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 51ADE160BFB; Fri, 3 Nov 2017 12:32:28 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9638B160BE9 for ; Fri, 3 Nov 2017 13:32:27 +0100 (CET) Received: (qmail 76139 invoked by uid 500); 3 Nov 2017 12:32:26 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 76127 invoked by uid 99); 3 Nov 2017 12:32:26 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Nov 2017 12:32:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id AE4071A5A86 for ; Fri, 3 Nov 2017 12:32:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 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, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id dPhV8MDcu2Sw for ; Fri, 3 Nov 2017 12:32:23 +0000 (UTC) Received: from mail-yw0-f177.google.com (mail-yw0-f177.google.com [209.85.161.177]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 23EB860F0A for ; Fri, 3 Nov 2017 12:32:23 +0000 (UTC) Received: by mail-yw0-f177.google.com with SMTP id k3so2236614ywk.8 for ; Fri, 03 Nov 2017 05:32:23 -0700 (PDT) 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 :cc; bh=CMtjG2HUzJEX+ruX7eAC1cloq5Ng8YvfCYcmZxkQ10U=; b=Ge+VOTpub+GFlxt1Vh0iaJbcBQkvxzZHs3QNvIimKraBAT2VDslb27yz+5Y9SUdd3r TWWl63Ppt/w5hlMqYCmdWb0o7lz5Mdo62jJHDxQLpU2gSRKogqp3irlAdzXgWKppWOBx OlOZZkRlVM8NC64RGDqRIf0O6TdQBcrD5mHw6fmkmvUOM1DyB6iBG0jeG3qNCPEo6uhu vYLhVvpO9CZ7JPNtSxA5JoDuNW0jJoEwq+8JNMBOPaSB3PuZo/WwBikHrA2wvfNvB7sX NTDq8zS16dQpvUkZotq+2BWlB+rIJktyvhb46adLp+2m9I+x60ATmcH3Lw2mr4Niqmy/ yfTw== 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:cc; bh=CMtjG2HUzJEX+ruX7eAC1cloq5Ng8YvfCYcmZxkQ10U=; b=LT1jyu4gCJCYDTqSnfguKo/USKTF0KNcV9buynGC+2ssyrvhYA4VxANqiS+jnzuqTW z2pUhO+voZz3ThuT2A780exq0fmFhyf0mey7kIsR0QgPIhhwvdYVigYYz5hz83SCEyzB 7VCADLkv+FEv3pX1x6nZuwGwuwH9Y/FMjoGEh5TRF5jGFdMZS952I8rHzaf+an6qG5/n pSyteFmQj7upTOFtJuAbVUQxPeUx+6aFI4rZK0zv0kdIhxRLPseQ3btw8dZYN+P93H9S g4WUoFgtDn/cb58IHlEucoTt6aAug5ukoYGdVNm2T8UlR/s8xSIX253iNwx8HWkzedN+ 8g2A== X-Gm-Message-State: AMCzsaWOyvEx3W/5YPbJSkFjxFbqc7TiScFgZJrE42vuLIoXMml8QgfO KzxCXMBFA7lB2SLWzBWj7nNyLE7EeFwkPRr6+uU= X-Google-Smtp-Source: ABhQp+Rv7y70D27ok3FUZbEt9vMvN4TTxbKerOuHJiaeU2Jd4p3Eby17LFcUTvkazWjCRbFYEes/0CbcWIB9CiGjx2I= X-Received: by 10.13.215.86 with SMTP id z83mr4326776ywd.354.1509712341930; Fri, 03 Nov 2017 05:32:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.187.200 with HTTP; Fri, 3 Nov 2017 05:31:51 -0700 (PDT) In-Reply-To: <7767B454-CC5E-46B6-9063-625A721DA817@objectstyle.org> References: <7767B454-CC5E-46B6-9063-625A721DA817@objectstyle.org> From: Michael Gentry Date: Fri, 3 Nov 2017 08:31:51 -0400 Message-ID: Subject: Re: Connection Pool Reconnects To: Cayenne Development Cc: Melvin Ramos Content-Type: multipart/alternative; boundary="94eb2c073c56da96ba055d134b49" archived-at: Fri, 03 Nov 2017 12:32:28 -0000 --94eb2c073c56da96ba055d134b49 Content-Type: text/plain; charset="UTF-8" To be a Hikari cheerleader, I recently switched to it from DBCP for local development and it reduced application startup by about 25%. The applications do lots of queries (and DB faults) on startup and Hikari really helped out with the connection pool performance (every query/fault required a checkout/in from the connection pool). I plan on pushing it forward (to testing/staging/production) in the future unless we discover issues with it. On Wed, Nov 1, 2017 at 3:23 AM, Andrus Adamchik wrote: > Hi Melvin, > > Don't have much recent experience with SQLServer specifically, but as a > general advise for better control of such things I would recommend using a > third-party connection pool such as DBCP2 [1], Tomcat [2] or Hikari [3] > (everyone's favorite as of late). All of them have manny more knobs that > you can turn compared to Cayenne built-in DataSource. E.g. Tomcat > DataSource has 'removeAbandoned' and 'removeAbandonedTimeout' settings that > allow to get rid of the stuck connections, which sounds like something that > can help here. > > There are a few ways you can install a custom DataSource in Cayenne. The > easiest is via API when starting ServerRuntime: > > ServerRuntime r = ServerRuntime.builder().dataSource(myDS).build(); > > Andrus > > [1] https://commons.apache.org/proper/commons-dbcp/ > [2] https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html > [3] https://github.com/brettwooldridge/HikariCP > > > On Oct 31, 2017, at 5:26 PM, Melvin Ramos > wrote: > > > > Hello all, > > > > > > I was wondering if you can help with my current issue. > > > > > > I connect to our Database (SQL Server) via VPN tunnel. When I forcefully > bounce our VPN connection and let the application to continue its process. > It just hangs and do nothing. > > > > > > What it the best way for the cayenne pool to detect connection failure? > Is there a way to force connection when it needs it? > > > > > > Please advice. > > > > > > Melvin > > > --94eb2c073c56da96ba055d134b49--