Priyanka,
On 10/20/22 15:50, Kumawat, Priyanka wrote:
Seems we are not using the connection pooling from Tomcat side ,
below are the DB configuration parameters on context.xml file, do not
see any connection pool details here.
<Resource
name="jdbc/db2"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.ibm.db2.jcc.DB2Driver"
url="jdbc:db2://30.177.13.12:3700/TIREHQ"
maxActive="200"
maxIdle="30"
maxWait="10000"
???!
The above is /absolutely/ the configuration of a database connection
pool. Even if you didn't recognize <Resource> to mean a DB connection
pool, certainly the host and port should have drawn your eye.
You are using Tomcat's built-in DBCP2-based connection pool. You can
find the configuration parameters online. I would highly recommend
reading about the "abandoned" capabilities of the connection pool, and
using them.
I have one more question , Sorry to bother again .
Can the below parameters can aid us with this issue , as given on
the below Technote , if yes how we need to determine the timings for
these parameters.
minEvictableIdleTimeMillis
timeBetweenEvictionRunsMillis
validationQuery
removeAbandoned
removeAbandonedTimeout
The validation query can help with ensuring that a connection borrowed
from the pool is still actually able to perform transactions. If you
aren't having any problems with your application being able to query,
then don't worry about that.
The eviction stuff has more to do with maintaining the smallest number
of connections to the database if they are not being used.
The abandoned stuff will help you identify bugs in your application, and
you should DEFINITELY enable these, even in production.
My advice would be to use the "abandoned" features in development as
well with a FIXED-size connection pool containing exactly one
connection. Give your application's apparently leakiness, I'm sure
you'll find 50 bugs during your first day and get them fixed quickly.
Hope that helps,
-chris
-----Original Message-----
From: Christopher Schultz <ch...@christopherschultz.net>
Sent: 21 October 2022 00:50
To: Kumawat, Priyanka <priyanka.kuma...@dxc.com>; Tomcat Users List
<users@tomcat.apache.org>
Subject: Re: DB2 database locks
Priyanka,
On 10/20/22 13:15, Kumawat, Priyanka wrote:
Thankyou muck for the explanation for this !!! we have got from below
mail that it is likely to be an application coding issue and they
needs to fix or use commit etc for long running transactions .
The one steps that you have given below to set the "query timeout" ,
is this one we can set up on Tomcat side?
That depends upon how you are obtaining you database connections. If you are
using a connection pool provided by Tomcat (either tomcat-pool or
dbcp-pool) then you can configure according to the documentation for whichever
component you are using (they have similar but different configuration styles).
-chris
DXC Technology Company -- This message is transmitted to you by or on behalf of
DXC Technology Company or one of its affiliates. It is intended exclusively for
the addressee. The substance of this message, along with any attachments, may
contain proprietary, confidential or privileged information or information that
is otherwise legally exempt from disclosure. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended recipient
of this message, you are not authorized to read, print, retain, copy or
disseminate any part of this message. If you have received this message in
error, please destroy and delete all copies and notify the sender by return
e-mail. Regardless of content, this e-mail shall not operate to bind DXC
Technology Company or any of its affiliates to any order or other contract
unless pursuant to explicit written agreement or government initiative
expressly permitting the use of e-mail for such purpose.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org