You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Scott Eade <se...@backstagetech.com.au> on 2001/11/14 06:09:45 UTC

Connection pool Monitor threads surviving servlet restart

I am using the TR.props property database.logInterval
to check out database connection pool status information.
I'm using a setting of 300000 to have a status line output
every 5 minutes.  This appears to work, however when
the servlet reloads the Monitor thread started by
TurbinePoolBrokerService does not get killed off.

After restarting my application a few times I now see
thins in turbine.log:

2001-11-14 14:55:34,153 [Thread-64] INFO  system - FROM logger:database:
default (in + out = total): 1 + 0 = 1
2001-11-14 14:56:30,497 [Thread-51] INFO  system - FROM logger:database:
default (in + out = total): 1 + 0 = 1
2001-11-14 14:59:17,639 [Thread-67] INFO  system - FROM logger:database:
default (in + out = total): 3 + 0 = 3
2001-11-14 15:00:34,129 [Thread-64] INFO  system - FROM logger:database:
default (in + out = total): 1 + 0 = 1
2001-11-14 15:01:30,473 [Thread-51] INFO  system - FROM logger:database:
default (in + out = total): 1 + 0 = 1
2001-11-14 15:04:17,614 [Thread-67] INFO  system - FROM logger:database:
default (in + out = total): 3 + 0 = 3
...

So I actually have 3 monitoring threads running at once!

If I look back through the log I can see a new thread
being added each time the servlet restarts.

It looks like the monitoring threads are not being
terminated correctly when the servlet shuts down
(as the IDBroker thread does).

Basically the connection pool monitoring should not
be used on a site where the JVM cannot be restarted.
This is likely to include most shared hosting environments.

Scott



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>