You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/01/18 16:59:18 UTC

[Bug 54217] JDBC connection pool runs out of connections when Context reload=“true” is enabled in Tomcat

https://issues.apache.org/bugzilla/show_bug.cgi?id=54217

--- Comment #13 from Levan <in...@gmail.com> ---
(In reply to Mark Thomas from comment #11)
> There are two separate issues in this report and WONTFIX is not the correct
> status for either of them.
> 
> The actual memory leak found while investingating this bug has been fixed in
> 7.0.34 onwards as per comments #4 to #6.
> 
> The issue of the connections not being closed on reload is a result of the
> J2EE specification for JNDI resources and this part of the bug report is
> therefore invalid.
> 
> I am restoring the state of this bug to fixed to reflect that the memory
> leak that did exist has been fixed.
> 
> To expandon why the failure to immediately close connection after relod is
> invalid, the J2EE specification provides no mechanism for the container to
> tell the resource it is no longer required. Therefore all the container can
> do is clear references to the resource and wait for garbage collection
> (which will trigger the closure of the pool and the associated connections).
> 
> Garbage collection occurs at times determined by the JVM so this is why it
> takes an indeterminate amount of time for connections to be closed after a
> context reload as a garbage collection may not occur for some time.
> 
> Tomcat has added the Tomcat specific JNDI attribute closeMethod which can be
> used to trigger the explicit close of a JNDI resource when a context is
> stopped. If waiting for GC to clean up resources is not acceptable then
> simply use this parameter. Tomcat does not use this by default as it may
> have unexpected and unwanted side-effects for some JNDI resources.
> 
> If you'd like to see a standard mechanism provided for telling JNDI
> resources that they are no loger required then you need to lobby the J2EE
> expert group.

Hi, Mark. A user on the Stack Overflow asked (quote from here
http://stackoverflow.com/questions/13595794/jdbc-connection-pool-runs-out-of-connections-when-context-reload-true-is-enabl/13631242?noredirect=1#comment44403937_13631242):
"What is the "unexpected and unwanted side-effects for some JNDI resources" and
does it apply to PostgreSQL connections?"

Would you be so kind to give a brief answer?

-- 
You are receiving this mail because:
You are the assignee for the bug.

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