From users-return-263841-archive-asf-public=cust-asf.ponee.io@tomcat.apache.org Fri Feb 16 23:42:50 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 F1F5F180647 for ; Fri, 16 Feb 2018 23:42:49 +0100 (CET) Received: (qmail 29695 invoked by uid 500); 16 Feb 2018 22:42:48 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 29684 invoked by uid 99); 16 Feb 2018 22:42:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Feb 2018 22:42:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 82E4CC046E for ; Fri, 16 Feb 2018 22:42:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.799 X-Spam-Level: * X-Spam-Status: No, score=1.799 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, SPF_HELO_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id uvGWYab5_8L0 for ; Fri, 16 Feb 2018 22:42:44 +0000 (UTC) Received: from mailbox.servedge.com (li1281-212.members.linode.com [45.79.182.212]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 5FE6A5F520 for ; Fri, 16 Feb 2018 22:42:43 +0000 (UTC) Received: (qmail 32448 invoked by uid 513); 16 Feb 2018 16:42:35 -0600 Received: from pool-173-66-117-24.washdc.fios.verizon.net (HELO Christophers-iMac.local) (chris@christopherschultz.net@173.66.117.24) by mailbox.servedge.com with ECDHE-RSA-AES128-GCM-SHA256 encrypted SMTP; 16 Feb 2018 16:42:35 -0600 Subject: Re: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object To: users@tomcat.apache.org References: <03eb9227-3a14-8a60-ab8b-bf95d8352415@christopherschultz.net> From: Christopher Schultz Message-ID: Date: Fri, 16 Feb 2018 17:42:35 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Arpan, On 2/16/18 3:13 PM, Halder, Arpan [ITSUS Non J&J] wrote: > We could locate the parameters in "jdbc-pool.html" file located > under apache-tomcat-7.0.67/webapps/docs" path. Is there somewhere > else we need to look into for this file? Could you please advise on > where we could find the file. I think you might need another member of your team to advise you on this subject and maybe represent you within this community. The file in question is part of Tomcat's user manual. It is not a configuration file, and is not a part of your own application. > Also in case the mentioned file is correct file but it is not > configured for our database - could you please let me know what is > the process of modification/setting up parameters and what are the > parameters we need to set in case it is not done for our case. The real configuration is usually in a file called context.xml in your application's META-INF directory. - -chris > -----Original Message----- From: Christopher Schultz > [mailto:chris@christopherschultz.net] Sent: Friday, February 16, > 2018 2:24 PM To: users@tomcat.apache.org Subject: [EXTERNAL] Re: > [E] Re: Cannot get a connection, pool error Timeout waiting for > ideal object > > Arpan, > > On 2/15/18 8:54 AM, Halder, Arpan [ITSUS Non J&J] wrote: >> We have already setup below parameters in jdbc-pool.html (see >> below) – could you please advise if we need to modify/add >> anything else here: > >>

And here is an example on how to configure a resource for JNDI >> lookups

<Resource 
>> name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" 
>> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" 
>> testWhileIdle="true" testOnBorrow="true" testOnReturn="false" 
>> validationQuery="SELECT 1" validationInterval="30000" 
>> timeBetweenEvictionRunsMillis="30000" maxActive="100"
>> minIdle="10" maxWait="10000" initialSize="10"
>> removeAbandonedTimeout="60" removeAbandoned="true"
>> logAbandoned="true" minEvictableIdleTimeMillis="30000"
>> jmxEnabled="true" 
>> jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionS
t
>
>>
>> 
ate;
> 
> 
> org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"
>> username="root" password="password" 
>> driverClassName="com.mysql.jdbc.Driver" 
>> url="jdbc:mysql://localhost:3306/mysql"/>
> > Looks like you copy/pasted that from the Tomcat documentation. How > about copy/pasting your actual configuration (without any secrets, > of course) just in case there are any errors in your > interpretation. > > Are you sure you don't have capacity problems? If you have only > e.g. 10 connections available but hundreds of users, perhaps you > simply need more connections. Are you sure the database is > available and reachable via the network? > > Sometimes timeouts are simply a reality. But if you start to see > "timeout" errors and the database is NOT DOWN and still reachable, > but everything grinds to a halt, then you certainly have a > resource problem. > > I disagree with another poster about abandoned connections: do not > remove them. Log them and allow the pool to become exhausted. That > way, you'll end up finding and fixing the problems instead of just > continuing to bleed. > > -chris > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqHXlsdHGNocmlzQGNo cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFh93w/+PO/2xkpVXDwEZQHL cGmR7kT7YuGNHU+ROu/cDuITm2TKMPzkl4HcvVS6heIbe/bZUVHm7Xf66mF9ArUc WKXJ4KB6JDnrF3Lgpg3otMFNs65Kd90Ku5Azos/QF7evmKGoJ386HyQCoJPRCPW4 qaIUB1qhbhESbPSs+WUkH5RSDUXpw6YA8+Q9ZgpFaNrEncAL7mZFLcM60NMLHLFQ 6l1zbz8i6fzXvjzWhYHdEBOOqVtaaR8vMK8QQ3RzWEwz0jtRS+P9dTfXfny40gRg 2B0yC5ZbcW+v7ya7VxhScjOrGnFQawsxyzW2i+DQfynERLMkZtpz3kxOqiGHehAV Qbe3yUgS8QaEh0rmD6hjFQMIUtDtr93ULlFGU27/Bl18cI02X/DQJn6D+dChSdus o85UImx/KfxTEFPru6gGFrrWHdMNvs2jh2PcEdRNf/X104kgZAdfcf9P9LtB7zZH LbERS+bqrY8UaloITcPl8hluPb57xfMn0F3SKo/52ZXQj5pB4NlUX66tAZGp1mfg id5OdHrbFsF4lyaULnF54oh5AfOnL3azkz8InZSfVeX+mnEFNfGF0mrWB76vGKBk Wwff96PGK5a6LnsHmIm8lEw5ZGYK8hkaELFTPA51qF8WQUWKMoXNVD2KtfVa/NUw hAbcuPVPHWqlgWZazlxyY7fs+WE= =sdf2 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org