[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-user
Subject:    Re: tomcat-jdbc PoolCleaner deadlock
From:       Robert Anderson <ranomail () gmail ! com>
Date:       2015-01-30 19:38:23
Message-ID: CAGrg8DW7fZG5xxpg4PRVKi9nqUZV9+zSjDdWN0R=o73oj_owxg () mail ! gmail ! com
[Download RAW message or body]


Ok, Filip!

Thanks,

Robert

2015-01-30 16:31 GMT-03:00 Filip Hanik <filip@hanik.com>:

> Robert, kindly let us know if disabling the pool cleaner does resolve your
> dead lock
> 
> Filip
> 
> 
> On Fri, Jan 30, 2015 at 12:25 PM, Robert Anderson <ranomail@gmail.com>
> wrote:
> 
> > Great, Filip!
> > 
> > "Returns true if the pool sweeper is enabled for the connection pool. The
> > pool sweeper is enabled if any settings that require async intervention
> in
> > the pool are turned on boolean result =
> > getTimeBetweenEvictionRunsMillis()>0; result = result &&
> > (isRemoveAbandoned() && getRemoveAbandonedTimeout()>0); result = result
> > > 
> > (isTestWhileIdle() && getValidationQuery()!=null); return result;" [1]
> > 
> > Best regards.
> > 
> > 
> > [1]
> > 
> > 
> https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/tomcat/jdbc/pool/PoolConfiguration.html#isPoolSweeperEnabled()
> 
> > 
> > 2015-01-30 16:13 GMT-03:00 Filip Hanik <filip@hanik.com>:
> > 
> > > Are you seeing that message, cause it seems to be a defensive check,
> but
> > > wouldn't happen due to
> > > 
> > > 509 public void initializePoolCleaner(PoolConfiguration properties) {
> 510
> > > //if
> > > the evictor thread is supposed to run, start it now 511 if (properties.
> > > isPoolSweeperEnabled()) { 512 poolCleaner = new PoolCleaner(this,
> > > properties
> > > .getTimeBetweenEvictionRunsMillis()); 513 poolCleaner.start(); 514 }
> > //end
> > > if 515 }
> > > 
> > > On Fri, Jan 30, 2015 at 12:05 PM, Robert Anderson <ranomail@gmail.com>
> > > wrote:
> > > 
> > > > Filip,
> > > > 
> > > > timeBetweenEvictionRunsMillis=0 does not disable PoolCleaner [1].
> > > > 
> > > 
> > > 
> > > 
> > > > 
> > > > if (sleepTime <= 0) {
> > > > log.warn("Database connection pool evicter thread
> > > > interval is set to 0, defaulting to 30 seconds");
> > > > this.sleepTime = 1000 * 30;
> > > > } else if (sleepTime < 1000) {
> > > > log.warn("Database connection pool evicter thread
> > > > interval is set to lower than 1 second.");
> > > > }
> > > > 
> > > 
> > > 
> > > 
> > > > 
> > > > 
> > > > [1]
> > > > 
> > > 
> > 
> http://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
> 
> > > > 
> > > > 
> > > > 2015-01-30 15:17 GMT-03:00 Robert Anderson <ranomail@gmail.com>:
> > > > 
> > > > > Sorry,
> > > > > 
> > > > > [1] https://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html
> > > > > 
> > > > > 2015-01-30 15:15 GMT-03:00 Robert Anderson <ranomail@gmail.com>:
> > > > > 
> > > > > Filip,
> > > > > > 
> > > > > > however, disabling the pool cleaner it should yield better
> results.
> > > > > > 
> > > > > > The documention[1] says:
> > > > > > 
> > > > > > "This value should not be set under 1 second"
> > > > > > 
> > > > > > Isn't true?
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 2015-01-30 15:07 GMT-03:00 Filip Hanik <filip@hanik.com>:
> > > > > > 
> > > > > > Looking at the locks that are involved in the dead lock, it's all
> in
> > > the
> > > > > > > intersys traces. Furthermore, it seems as intersys may already be
> > > doing
> > > > > > > pooling inside the driver. If that is the case, you have two
> > options
> > > > > > > 
> > > > > > > 1. disable pooling in intersys OR
> > > > > > > 2. don't use tomcat's jdbc pool since intersys already does
> pooling
> > > > > > > 
> > > > > > > however, disabling the pool cleaner it should yield better
> results.
> > > > > > > 
> > > > > > > On Fri, Jan 30, 2015 at 11:02 AM, Filip Hanik <filip@hanik.com>
> > > wrote:
> > > > > > > 
> > > > > > > > Disable the pool cleaner
> > > > > > > > 
> > > > > > > > timeBetweenEvictionRunsMillis=0
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic