Tomcat is famous for the classloader leak that occurs on repeated redeployments of an app. They seem to usually be centered around the logger class. Repeated redeployments end up causing Perm Gen errors.
I know this tends to be a big problem in Tomcat 6. Is it any better in Tomcat 7?
On a side note, does anyone have any good resources for handling classloader leaks. Is the situation any better with other servers?
Well, this isn't really caused by Tomcat but rather by applications using ThreadLocal
s, failing to deregister JDBC drivers or stopping custom threads, etc. Tomcat 6 introduced some memory leak detection mechanism, Tomcat 7 improved it significantly: MemoryLeakProtection.
With regards to loggers leaking, have a look at very comprehensive Taxonomy of class loader problems encountered when using Jakarta Commons Logging.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With