tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Halder, Arpan [ITSUS Non J&J]" <ahald...@ITS.JNJ.com>
Subject RE: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object
Date Fri, 16 Feb 2018 23:58:22 GMT
Hi Chris,

Thanks a lot for your help!!Much appreciated!!

We could able to locate context.xml under " /apps/apache-tomcat-7.0.67/conf" path - see below:


    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->

    <!-- Uncomment this to enable Comet connection tacking (provides events
         on session expiration as well as webapp lifecycle) -->
    <!--
    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
    -->

 <Resource name="jdbc/E2EMFPostGres" auth="Container" type="javax.sql.DataSource"
          maxActive="50" maxIdle="30" maxWait="10000"
                   username="saevdcep" password="xxxxxx" driverClassName="org.postgresql.Driver"
                            url="jdbc:postgresql://itsusralsp06829:5432/spectra"/>

<Resource name="jdbc/EVDSEARCH" auth="Container" type="javax.sql.DataSource"
          maxActive="50" maxIdle="30" maxWait="10000"
                   username="saevdcep" password="xxxxxxx" driverClassName="org.postgresql.Driver"
                            url="jdbc:postgresql://itsusralsp06829:5432/evidencesearch"/>


</Context>


Could you please check which are the parameters to add/modify/delete.

Also we could locate another "context.xml" under " /apps/apache-tomcat-7.0.67/webapps/host-manager/META-INF"
and " /apps/apache-tomcat-7.0.67/webapps/manager/META-INF" path - could you please advise
if we need to make any change here:

<Context antiResourceLocking="false" privileged="true" >
  <!--
    Remove the comment markers from around the Valve below to limit access to
    the host-manager application to clients connecting from localhost
  -->
  <!--
  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />


Thanks and Regards,
Arpan

Arpan Halder 
Tata Consultancy Services providing services to:
Global Data and Analytics
Application Support / ITAS
Route 22 West▪NJ 08876 ▪ USA
Mobile: +1 (908) 392 2947 


-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net] 
Sent: Friday, February 16, 2018 5:43 PM
To: users@tomcat.apache.org
Subject: [EXTERNAL] Re: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal
object

-----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