tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object
Date Fri, 16 Feb 2018 22:42:35 GMT
Hash: SHA256


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 
> [] Sent: Friday, February 16,
> 2018 2:24 PM To: 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
> 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:
> For additional commands, e-mail:
> ---------------------------------------------------------------------
To unsubscribe, e-mail:
> For additional commands, e-mail:
Comment: GPGTools -
Comment: Using GnuPG with Thunderbird -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message