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

Shawn,

On 3/25/18 12:17 AM, Shawn Heisey wrote:
> On 3/24/2018 5:04 PM, Mark Thomas wrote:
>> Regarding your configuration: <Resource name="jdbc/REDACTED" 
>> auth="Container" 
>> factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" 
>> driverClassName="com.mysql.jdbc.Driver" 
>> type="javax.sql.DataSource" maxActive="60" maxIdle="10" 
>> maxWait="30000" removeAbandoned="true" 
>> removeAbandonedTimeout="30" username="REDACTED" 
>> password="REDACTED" testOnBorrow="true" validationQuery="select
>> 1" 
>> url="jdbc:mysql://REDACTED.REDACTED.com:3306/REDACTED?autoReconnect=t
rue&amp;zeroDateTimeBehavior=round"
>>
>>
>> 
/>
>> 
>> Generally, that looks OK but I'd strongly recommend that you use 
>> "autoReconnect=false" in the URL. autoReconnect is known to be 
>> problematic with connection pools.
>> 
>> The removeAbandonedTimeout looks low but if all the queries are
>> expected to be well under 30s then that should be OK.
> 
> Somehow I did not see this part of your email at all when I read it
> the first time.  I just noticed it.  My previous reply probably has
> you scratching your head a little bit.  I'm sorry about that!
> 
> The timeout of 30 seconds is EXTREMELY low.  And if it were being 
> honored, we would have customers lining up outside the office with 
> pitchforks.  The webapp has reporting ability for users with
> elevated privileges, and a lot of those reports take a minute or
> two to run, sometimes even longer.  So if the pool were killing
> connections after 30 seconds, the reporting mechanism would be
> failing a LOT.  If you check the *planned* configuration, you'll
> see that I have increased this timeout to 3600.  I wanted to make
> it 900, but some of the developers are worried that 900 is too
> aggressive.

The pool doesn't kill abandoned connections. It simply removes them
from the pool. Otherwise, you're right: you'd have torches and
pitchforks everywhere.

Sounds like you need to raise that timeout by a LOT.

Also, set logAbandoned="true" and you'll get a helpful message every
time a connection is considered abandoned and you'll find out if you
have a connection leak (as opposed to simply a too-short "abandoned"
setting).

> Because there are no pitchforks, I know that abandoned connection 
> removal is NOT happening, even though it IS configured.

It's probably happening, just not meeting your expectations. Those
abandoned connections will pretty much live forever, no longer being
managed by the pool and yet still counting as being used by the
server. Maybe lower your idle-timeout on the server to help with this.

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlq5LcMdHGNocmlzQGNo
cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFhZtg/+JtDnnYN7vKrKWK5l
38qv2IJ6hc67scU7gGorcvfXDYm4pBJIMn9t1o9cR1+P9TOpKnoywhacwX6ajtog
B8gry43LNlhsWWwERN+0V0YO87cCSONnmhxUaDwaIS4EISTnH5TnZYm5RluETT/H
RVytMLKbgjMSe4lKcI27IBYJJBQEn56/OEZ1eDG4tdt9hMtJ3Zx1wx3RsA1Gf8M7
UK3BJIOTW8vpnXq5lQR273tMTPtcMkpW/BKD6ZXCMgqCLEJIIXQYTXPMn7SrrV3j
IDDRZyraxBzHaUfgcj+cw4HfL4y/oheM6zaGBTN75eu9mRQZel5QbdyrBkqs3SKt
zW2C9e5Q4Rly99gYDZeWwGWSlNmHCAUdRY1fTjK7UzXbd1dIgSdhlr8F0gC08dQX
eUkkM+5U3Hx1TnHfGGQAN0fw3fHWyCNwyI1iBwlYVumum1YhbRlMfncZ6hjNlcqa
txcaiyD+BxIrcDQ/xERJXT05LzWpKf5zeOzlImLnfggMz34pfQxAcsa7nUGnb3Ez
Q9Jx7LhZzwEPHvmkGZydE/LszvNYVsqfMNKnSrmjY6vFRT6MpSjBudhkeP25bEsx
SV7uzFI3TJYbfzyETD4R8Yf/0un3pwwohyO4OYpKWz+v0iLFX796Hld5RFWYo1as
eD8h3yvvJkckHLYDwIrhdgDy9yQ=
=UG4z
-----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