Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-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 C84AD18E62 for ; Fri, 31 Jul 2015 23:14:26 +0000 (UTC) Received: (qmail 52005 invoked by uid 500); 31 Jul 2015 23:14:21 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 51972 invoked by uid 500); 31 Jul 2015 23:14:21 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 51960 invoked by uid 99); 31 Jul 2015 23:14:21 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jul 2015 23:14:21 +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 E75161A9428 for ; Fri, 31 Jul 2015 23:14:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=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-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id PQkVbncDh9Bu for ; Fri, 31 Jul 2015 23:14:15 +0000 (UTC) Received: from mail-qg0-f43.google.com (mail-qg0-f43.google.com [209.85.192.43]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 4F1F8205B8 for ; Fri, 31 Jul 2015 23:14:14 +0000 (UTC) Received: by qgeu79 with SMTP id u79so56393161qge.1 for ; Fri, 31 Jul 2015 16:13:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=aoeixCeretZVtYRogccS0KIGO2PW0lE9UBX/0fVM48o=; b=KztI05EyEkRdD9RYQ1Th1BC6Y4R5g6QovASE8Tu0BEsprJDRrXz2Ams/kMT+GuW8JB mP5xYktdO/5Uxk3OssfIuXUJdXflX1oitutL3+Ud/7dqUZv8x9KIjU5SLg5I+HtDmbjp y+8DQxppvcLURHYI+ajghtK43E2bx3Hx41wYcF2JtxjIOK63kKzCM/xhJDCzIPQ3y6Uv TS5NB8V29D55oi9UhaUGfutOfaKP2ryp/UH97duGBqfSTjeCzeKt0YqLfqHLORZjV64s v/O1HfZxQ3BAT8sjyYhbmbrfRU2LzcY9NyJPWBr3tcY8f9w7HyQ1SYW3vU1PSG4rcth2 BS4w== X-Received: by 10.140.22.135 with SMTP id 7mr8744363qgn.98.1438384408443; Fri, 31 Jul 2015 16:13:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.18.176 with HTTP; Fri, 31 Jul 2015 16:13:09 -0700 (PDT) In-Reply-To: References: <1EF83356-E7BD-4438-88E2-30D222466E75@objectstyle.org> <272C0255-17C0-4353-B95C-941B84A9F43C@objectstyle.org> From: Mike Kienenberger Date: Fri, 31 Jul 2015 19:13:09 -0400 Message-ID: Subject: Re: java.sql.SQLException: Can't obtain connection. Request timed out. To: user@cayenne.apache.org Content-Type: text/plain; charset=UTF-8 Ok. Now that I've manually reduced my duplicate stack dumps so that they're readable, I see that I do indeed have four separate threads hitting the database at the same time, and three of them are using the same runtime. So apparently my app isn't as serialized as I had previously thought. I guess the real surprise is that it works as well as it does with only 3 database connections in the pool. I'll raise that up to 5-to-10 and probably be good for another decade :) Thanks for the hints, Andrus. On Fri, Jun 12, 2015 at 11:21 AM, Mike Kienenberger wrote: > Hmm. I just remembered that I have a second infrequently-accessed > database which is also configured. > > So I'd really have 3 runtimes * 2 connection pools, so that explains 6 of the 8. > > Not sure where the other two are from unless I have a 4th runtime that > I've overlooked. > > > On Cayenne 4, yes, that's one of my goals this summer -- upgrade to > Cayenne 4. Probably won't happen until July, though. > > > I'm going to add something that will dump all threads when this > exception is hit. > > On Fri, Jun 12, 2015 at 11:15 AM, Andrus Adamchik > wrote: >> >>> On Jun 12, 2015, at 6:09 PM, Mike Kienenberger wrote: >>> >>> And, interestingly enough, I only have 8 "PoolManagerCleanup" threads, >>> and not the 9 that I expected. Maybe they are create-on-demand and >>> one of my runtimes hasn't needed it yet? >> >> There should be 3 actually. One per PoolManager, not one per connection. So something may be going on there. >> >> FWIW 4.0.M3 (master branch) has a completely new non-blocking alternative to PoolManager. The cleanup process is also more sane there. >> >> Andrus >>