You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2018/01/26 20:38:10 UTC

Re: [OT] No movement at Debug mode

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

All,

On 1/23/18 10:58 AM, Christopher Schultz wrote:
> The MySQL Connector/J simply has a bug. Upgrade to the latest
> version to see if they have fixed it.
> 
> I gave up trying to convince them that it was a problem and that
> they needed to fix it, because I guess they fundamentally don't
> understand what it means to want to be able to "completely
> deregister the driver and shutdown all threads".

I've been reading the release-notes for some of the more resent
versions of MySQL Connector/J, and this[1] looks interesting:

"
... [blaming Tomcat for our problems blah blah]...

The implementation of AbandonedConnectionCleanupThread has now been
improved, so that there are now four ways for developers to deal with
the situation:


* When the default Tomcat configuration is used [...] Connector/J now
detects the stopping of the web application within 5 seconds and kills
AbandonedConnectionCleanupThread

* When Tomcat's context is configured with the attribute
clearReferencesStopThreads="true" [... blah blah Tomcat does stupid
stuff blah blah ...]

* When a ServletContextListener is implemented within each web
application that calls
AbandonedConnectionCleanupThread.checkedShutdown() on context
destruction, Connector/J now, again, skips this operation if the
driver is potentially shared with other applications. No warning about
the thread being unstoppable is issued to Tomcat's error log in this
case.

* When AbandonedConnectionCleanupThread.uncheckedShutdown() is called,
the AbandonedConnectionCleanupThread is closed even if Connector/J is
shared with other applications. However, it may not be possible to
restart the thread afterwards.

"

It would be nice to know (a) how Connector/J determines (in scenario
#3) whether or not Connector/J is being "shared with other
applications". How do they stop Tomcat from logging a warning in this
case?

It would also be nice to know why (in scenario #4) the
AbandonedConnectionCleanupThread cannot be restarted if necessary.
This seems like bad design to me, and a continued failure to
understand what is going on and how developers need to interact with
the libraries they use.

I also don't understand why the thread is *always* launched.
Connector/J claims that "only queries issued with execution-timeouts
cause that thread to be launched" bug I don't have an application that
uses any query-timeouts and that thread is ALWAYS running.

- -chris

[1] https://dev.mysql.com/doc/relnotes/connector-j/5.1/en/news-5-1-41.ht
ml
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlprkbIdHGNocmlzQGNo
cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFgjfhAAh+O83mT0ZvfstEzi
IbVqTJIiUVFstmjvtagwBO6wEsdJFRckRrWa3flRM7O/5pX3XPIug5cRof6QaK4R
BCpJGqtunkCGU0faNoqV82Um6MmKwMrhl8ifZBDbsbN2zhqxtRLd/GDIMh27MY3f
e/WrZiXWRzQKDeCqQvOGfVjjGIYYCwrlVOwGCph9uY1+0rLZZilVoP2WAe7mSUQ+
FRMMYsC6YFkwUj0C2EK1ZKi958zfN+Yvk4rg2QlRpB+hwm5JNldHmUgHDubBeUcI
USh7bDa3gqrT2r7zxhwZt4uiNcZ8/odrVcJj+G6156JXXTWm7GgHmgHVDFd/cBSE
Sr4mufZvL9BT0eGD91UldlEybjSi0ikWDt+7lkJgd9y03CEaNrihv+k+ANk1Th8Z
WpuRJlP4emK88bgNSp1ijayqxIxwuDoHGyvUtTfDdkoDCSp95F+fhGATYM7Aiscn
1I1G2KZAdSlKc1c6WK6jPBweyxMPDBMby9WjiCGrVri6aKAAvXHgVtDT/ZbLThga
GzrzSl3OIUgvRjjtcTv7s8Vsv34K/xzYyEUsEbFsNuzKC4CHxaDj/6fxhXraKnTW
uBTyVdhp9vOVgdQLrOFuqbxcyzJ6MtTRWPRKWruPnq+4jsp8SxDk00h/4VW2URhT
Qufn7J7DCl2ZEwvPhPUJx6QYAoE=
=zDYj
-----END PGP SIGNATURE-----

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