You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Neil Robinson <ne...@netbusiness.com.au> on 2014/04/30 04:39:38 UTC

Issues with Tomcat Connection Pooling

Hi Everyone,

I have a couple of issues with the in-build Tomcat connection pooling under
Tomee 1.6.0 Plus.

I am defining everything in conf/tomee.xml

<Resource id="database" type="javax.sql.DataSource">

jdbcDriver = com.mysql.jdbc.Driver

jdbcUrl = jdbc:mysql://0.0.0.0:0000/db-name

userName = username

password = password

jtaManaged = false

accessToUnderlyingConnectionAllowed = true

connectionProperties = autoReconnect=true;characterEncoding=UTF-8;

defaultAutoCommit = true

timeBetweenEvictionRunsMillis=5000

initialSize = 3

maxActive = 100

maxIdle = 100

maxOpenPreparedStatements = -1

maxWaitTime = 10000 millisecond

MinEvictableIdleTimeMillis = 60000

minIdle = 4

numTestsPerEvictionRun = 5

passwordCipher = PlainText

poolPreparedStatements = true

testOnBorrow = true

testOnReturn = false

testWhileIdle = true

validationQuery = SELECT 1;

validationInterval = 30000

maxConnLifetimeMillis = 300000

timeBetweenEvictionRunsmillis = 30000

removeAbandoned = true

removeAbandonedTimeout = 300

logAbandoned = true

</Resource>
looking at this is jconsole, some of the settings are not being applied;

MinEvictableIdleTimeMillis = 60000
timeBetweenEvictionRunsmillis = 5000

This seems to be causing the poolsweeper not to be enabled, which is not
removing old connections from the pool etc.

Is anyone else seeing this issue? I can supply more screenshots if required.
-- 
Message  protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.
http://www.mailguard.com.au



Re: Issues with Tomcat Connection Pooling

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

That's cause we fallback on dbcp properties (for compatibility).

In your case (you define everything) add IgnoreDefaultValues = true or just
use dbcp properties name for conflicting ones
Le 30 avr. 2014 04:32, "neil" <ne...@netbusiness.com.au> a écrit :

> Jonathan Fisher wrote
> > Wouldn't you want to have your url be jdbcUrl = jdbc:mysql://
> > 127.0.0.1:0000/db-name or jdbcUrl = jdbc:mysql://localhost:0000/db-name
> > instead
> > of jdbcUrl = jdbc:mysql://0.0.0.0:0000/db-name ?
>
> I have just nulled out the values, using something like
> jdbc:mysql://192.168.100.100:3306/tomee-db
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Issues-with-Tomcat-Connection-Pooling-tp4669043p4669045.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Issues with Tomcat Connection Pooling

Posted by neil <ne...@netbusiness.com.au>.
Jonathan Fisher wrote
> Wouldn't you want to have your url be jdbcUrl = jdbc:mysql://
> 127.0.0.1:0000/db-name or jdbcUrl = jdbc:mysql://localhost:0000/db-name
> instead
> of jdbcUrl = jdbc:mysql://0.0.0.0:0000/db-name ?

I have just nulled out the values, using something like
jdbc:mysql://192.168.100.100:3306/tomee-db



--
View this message in context: http://openejb.979440.n4.nabble.com/Issues-with-Tomcat-Connection-Pooling-tp4669043p4669045.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Issues with Tomcat Connection Pooling

Posted by Jonathan Fisher <jo...@springventuregroup.com>.
Wouldn't you want to have your url be jdbcUrl = jdbc:mysql://
127.0.0.1:0000/db-name or jdbcUrl = jdbc:mysql://localhost:0000/db-name instead
of jdbcUrl = jdbc:mysql://0.0.0.0:0000/db-name ?


*Jonathan Fisher*
*VP - Information Technology*
*Spring Venture Group*

On Tue, Apr 29, 2014 at 9:39 PM, Neil Robinson <ne...@netbusiness.com.au>wrote:

> Hi Everyone,
>
> I have a couple of issues with the in-build Tomcat connection pooling
> under Tomee 1.6.0 Plus.
>
> I am defining everything in conf/tomee.xml
>
>  <Resource id="database" type="javax.sql.DataSource">
>
> jdbcDriver = com.mysql.jdbc.Driver
>
> jdbcUrl = jdbc:mysql://0.0.0.0:0000/db-name
>
> userName = username
>
> password = password
>
> jtaManaged = false
>
> accessToUnderlyingConnectionAllowed = true
>
> connectionProperties = autoReconnect=true;characterEncoding=UTF-8;
>
> defaultAutoCommit = true
>
> timeBetweenEvictionRunsMillis=5000
>
> initialSize = 3
>
> maxActive = 100
>
> maxIdle = 100
>
> maxOpenPreparedStatements = -1
>
> maxWaitTime = 10000 millisecond
>
> MinEvictableIdleTimeMillis = 60000
>
> minIdle = 4
>
> numTestsPerEvictionRun = 5
>
> passwordCipher = PlainText
>
> poolPreparedStatements = true
>
> testOnBorrow = true
>
> testOnReturn = false
>
> testWhileIdle = true
>
> validationQuery = SELECT 1;
>
> validationInterval = 30000
>
> maxConnLifetimeMillis = 300000
>
> timeBetweenEvictionRunsmillis = 30000
>
> removeAbandoned = true
>
> removeAbandonedTimeout = 300
>
> logAbandoned = true
>
> </Resource>
> looking at this is jconsole, some of the settings are not being applied;
>
> MinEvictableIdleTimeMillis = 60000
> timeBetweenEvictionRunsmillis = 5000
>
> This seems to be causing the poolsweeper not to be enabled, which is not
> removing old connections from the pool etc.
>
> Is anyone else seeing this issue? I can supply more screenshots if
> required.
>
>
> ------------------------------
> Message protected by MailGuard: e-mail anti-virus, anti-spam and content
> filtering.
> http://www.mailguard.com.au
>
>
>