Recently we had a issue in our webservice that for each request number of classes getting loaded is getting increased and all the JAXB related classes are loading for every request.
Theory as to cause What we were seeing seems very similar to what was reported in issue https://issues.apache.org/jira/browse/CXF-2939. We don't use CXF, but both CXF and Metro (which is what we use) use the same JAXB reference implementation.
Finally we found a JVM option that disables a JAXB performance optimisation setting.
Thanks to my collegue Peter Blackburn who identified this property. This fixes the constantly increasing class loaded count problem.
SET NEW JVM OPTION
Using the Glassfish console add below new system properties.
Configuration Name Environment Value com.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize Prod=True ./asadmin create-jvm-options --target server-config -- -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true
Remember to restart the specific cluster/server once we added the property. We can also Trace class loading and unloading was enabled on the development server ( -XX:-TraceClassLoading and -XX:-TraceClassUnloading system properties).
Two JVM options -- -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${com.sun.aas.instanceRoot}/OutOfMemory-heap.hprof -- will be set in order to produce a heap dump on OutOfMemory errors. This is a fallback mechanism should we be unable to produce a heap dump live.
3 comments:
You can have the money in unsecured or secured options london business angels There are definitely not any obligations in this transaction method
The magnate of them one Wag each starting at their leftfield get-go substructure and chronic until each instrumentalist has two initial card game both Facial expression up or Human face down depending on the biz. [url=http://www.bvnvpaydayloans.co.uk/]payday loan[/url] payday loans The casino volition let in gaming throughout your Loose of buck or even on your engaged metre? http://www.bbvcpaydayloans.co.uk/
I have also successfully used this JVM option to solve a problem when launching a debugger. When I launch a GUI in a debugger from my IDE, the GUI will often hang before the main window opens. It seems to be a race condition, but I'm not sure. It happens under both NetBeans and IntelliJ, and may well happen under others that I don't use. But this JVM option, when set to true, prevents it from hanging. It's very useful that way, but I have no idea why it works.
Post a Comment