-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 3/5/14, 9:48 AM, Christopher Schultz wrote:
> Mark,
> 
> On 3/5/14, 8:56 AM, Mark Thomas wrote:
>> On 05/03/2014 13:38, Christopher Schultz wrote:
>>>>> My DataSource configuration:
> 
>>>>> <Resource name="jdbc/diagnosis" description="JDBC
>>>>> connection to main CHADIS database" auth="Container" 
>>>>> type="javax.sql.DataSource" maxActive="1" maxIdle="1" 
>>>>> maxWait="10000" url="[url]" username="[user]" 
>>>>> password="[user]" driverClassName="com.mysql.jdbc.Driver" 
>>>>> removeAbandoned="true" removeAbandonedTimeout="30" 
>>>>> logAbandoned="true" testOnBorrow="true"
>>>>> validationQuery="/* ping */ SELECT 1" />
> 
>>>>> Note that I have a single database connection in the pool.
> 
>>>> Not with DBCP 2 you don't. maxActive has been renamed to 
>>>> maxTotal so you'll have the default (8 from memory) 
>>>> connections in the pool. This is likely to be a common
>>>> problem. We probably need to add something to catch this,
>>>> report a warning and set the correct attribute.
> 
>>> Okay, I'll take a look at that. What I can observe practically 
>>> is that only a single connection to my MySQL database has been 
>>> made, whatever the reason. Perhaps that's part of the trouble.
> 
>> Hmm. I don't recall exactly when this was renamed in DBCP 2. It
>> is always possible the build you are using does what you think
>> it does.
> 
> I checked the configuration reference for DBCP 2, and two
> important configuration properties were renames:
> maxActive->maxTotal and maxWait->maxWaitMillis. When a connection
> couldn't be obtained (for whatever reason... possibly POOL-248),
> the checkout was waiting forever instead of timing-out after 10
> seconds.
> 
> I'm re-testing with the modified configuration, but still with a
> stock 8.0.3.

Oddly enough, things seem to work with only an updated configuration:
setting maxInitial and maxTotal instead of maxActive and maxWaitMillis
instead of maxWait (actually, I have both sets of configuration in
there, so I can start Tomcat 7 or Tomcat 8 with the same context.xml
file). It still takes 5 seconds to render the whole page, but that's
/my/ problem, now ;)

I'll see if I can tell what the difference is between the two
configurations using JMX. When using maxActive, I should have gotten
the default of 8 connections but instead I got a single connection
that got stuck somehow under some load (authentication and initial
page-load worked, so the connection /was/ available at some point).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTFzxBAAoJEBzwKT+lPKRYnGYQALVDmUdeBGkZPTdv7c6pmbQG
t/aAK49JCjrOZ2CRgdwbNgBNByeTY6dpBVtp/S9S9yigYRkfGq0Dlkp0496rGtyz
1ihR0g3Af37DCaQiBKgJEYlhVJGvpNBTPTQYhX1U0kbv0e807nfYrqXmk0YguKeM
z2Ca6GxhlNy8uW/FWhXraSICCFV4crrMn9r01qPcOPjLhCRm0yqBLJzRHKY8XSEK
UsDBMp9J93gOAf5wh7mqFUEVbJ4RbPouP7UmgSqAiv1kUHoGpMCNBtu8P1CFjIQh
7vSCe89+UIkJPPi2QN4qZ9atF/LZYyEer9tAPF6SHpGk7C4UFEG16AdDtPBxuYDE
zw5HZqrl1y/Ugrr62+MOrIjYMzecCTgAAOPdzkqc+Dh+BGgZaHKPg/Bvz9Ch+Doo
tythI27HxFyMCAXSwm17BRtCHwbxVAzM6V3q5Ns4KMc+tNwwyxxTHhQdfCIpYnXQ
2A2iOMGy6WFxHy8FR1dljdVp2zxJN3W+xNGESw/1y0DmKkC1HI49i/o4aV+mXD1V
e7wI7jBJLKZ6X8J7AbWJp4NzEykHVqlWRdr07nPcWlQN5pd9sJSB6f15OtgDkw+o
iTRLZ642lMtyNWD8jhCDcnZNG+Q5G2h2eLmhbaFCgfnsOynNQpe2T47jZJYnrzcI
JPmg/zqYsxMBfI7kHnK5
=tWti
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to