I'm looking for a hint how to make tomcat CI ready or an servlet container / application container which stand often redeploys like they happen when using hudson ci.
I experienced that Tomcat 6 does not properly undeploy webapps, leaving classes in jvm.
For example I monitored tomcat 6 with VisualVM: on start 2000 classes, on deploy of an app 3000 after redeploy 4000 and redeploy 5000 classes and so on - leading to crashes, memory leaks...
Okay hope one have a hint on tomcat and continuous-integration or other app servers.
Apache Tomcat version 6.0 implements the Servlet 2.5 and JavaServer Pages 2.1 specifications from the Java Community Process, and includes many additional features that make it a useful platform for developing and deploying web applications and web services.
Tomcat is an application server designed to execute Java servlets and render web pages that use Java Server page coding. Accessible as either a binary or a source code version, Tomcat's been used to power a wide range of applications and websites across the Internet.
Update : I've performed some tests with a moderately complex web application using Spring, Hibernate, GWT, C3P0 and HsqlDB.
Stock Tomcat 6.0.24 works just fine , provided you use the client compiler. It works on ten redeploys, whereas the server compiler breaks down on the fourth. I suggest you try with the -client
flag.
Trying to debug the usage of the server compiler was fruitless, as the Eclipse MAT showed no GC roots for the classloaders, and yet they were retained. An oft-referenced bug , PermHeap bloat in and only in server VM was reportedly fixed in Java 6 update 16, but my tests fail with Java 6 update 16.
Tomcat has been checked and double-checked for such memory problems, and quite often the applications were to blame. No that is not to say that it's necessarily hard to have such a perm gen leak.
There are two possibilities here:
If you actually want to debug this problem and make sure that it's Tomcat's fault, you can you the Eclipse memory analyser. They have a good blog post explaining how to debug PermGen problems.
I always like to take drastic measures to make sure that everything is clean and in a fully reproducible state when starting
1) kill tomcat
2) delete it from disk
3) unzip a clean version
4) overwrite your personalized modified configured files
5) restart tomcat
6) deploy your app
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