tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object
Date Fri, 16 Feb 2018 22:42:35 GMT
-----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:
> 
>> <p>And here is an example on how to configure a resource for JNDI
>>  lookups</p> <div class="codeBox"><pre><code>&lt;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"/&gt;</code></pre></div>
> 
> 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


Mime
View raw message