  | |  | Performance problem under load - Xerces with Weblogic 9.x | Performance problem under load - Xerces with Weblogic 9.x 2007-06-29 - By Rajesh Balamohan
Hello Folks,
We are using xerces parser for creating DOM objects. The size of the xml is very small in the order or 1 or 2kb. Under load, most of the threads in weblogic are blocked like the following.
And the CPU of the box is at 98% in a 4 way box. Looking at the stacktrace below, I find that most of the time is spent in schema loading. There are lots of threads with similar stack trace. Are there any known workarounds for this problem?.
Is there a way to improve the XMLSchemaLoader?
The options we use during XML parser creation is as follows.. (Any help on this issue would be of great help folks).
// Build a parser to order. p = new DOMParser(); p.setFeature("http://xml.org/sax/features/validation", true); p.setFeature(" http://apache.org/xml/features/validation/schema", true); p.setFeature(" http://apache.org/xml/features/validation/schema/normalized-value", false); p.setFeature(" http://apache.org/xml/features/dom/defer-node-expansion", false);
p.setEntityResolver(this); p.setErrorHandler(this);
"[ACTIVE] ExecuteThread: '12' for queue: 'weblogic.kernel.Default(self-tuning)'" daemon prio=6 tid=0x54777e60 nid=0x138 0 waiting for monitor entry [0x544bf000..0x544bfb9c] at java.util.Hashtable.get(Hashtable.java:335) - waiting to lock <0x0c54f0f8> (a java.util.Hashtable) at org.apache.xerces.impl.xs.traversers.XSAttributeChecker.checkAttributes(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSAttributeChecker.checkAttributes(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDWildcardTraverser.traverseAny(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDAbstractParticleTraverser .traverseSeqChoice(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDAbstractParticleTraverser .traverseSequence(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser .processComplexContent(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser .traverseComplexTypeDecl(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDComplexTypeTraverser.traverseGlobal (Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseNamedElement (Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseGlobal(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseSchemas (Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar (Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement (Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement (Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher .scanRootElementHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher .dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
-- ~Rajesh.B
Hello Folks,<br><br>We are using xerces parser for creating DOM objects. The size of the xml is very small in the order or 1 or 2kb. Under load, most of the threads in weblogic are blocked like the following.<br><br>And the CPU of the box is at 98% in a 4 way box. Looking at the stacktrace below, I find that most of the time is spent in schema loading. There are lots of threads with similar stack trace. Are there any known workarounds for this problem?. <br><br>Is there a way to improve the XMLSchemaLoader?<br><br>The options we use during XML parser creation is as follows.. (Any help on this issue would be of great help folks).<br><br> // Build a parser to order. <br> p = new DOMParser();<br> p.setFeature("<a href="http://xml.org/sax/features /validation">http://xml.org/sax/features/validation</a>", true);<br> p.setFeature ("<a href="http://apache.org/xml/features/validation/schema">http://apache .org/xml/features/validation/schema</a>", true);<br>   ; p.setFeature("<a href="http://apache.org/xml/features /validation/schema/normalized-value"> http://apache.org/xml/features/validation/schema/normalized-value</a>", false);<br> p.setFeature("<a href= "http://apache.org/xml/features/dom/defer-node-expansion">http://apache.org/xml /features/dom/defer-node-expansion </a>", false);<br><br> p .setEntityResolver(this);<br> p .setErrorHandler(this);<br><br>"[ACTIVE] ExecuteThread: '12' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon prio=6 tid =0x54777e60 nid=0x138 <br>0 waiting for monitor entry [0x544bf000..0x544bfb9c]<br> at java.util.Hashtable.get(Hashtable.java:335)<br>  ; - waiting to lock <0x0c54f0f8> (a java.util.Hashtable)<br> at org .apache.xerces.impl.xs.traversers.XSAttributeChecker.checkAttributes (Unknown Source)<br> at org.apache .xerces.impl.xs.traversers.XSAttributeChecker.checkAttributes(Unknown Source)<br > at org.apache.xerces.impl.xs .traversers.XSDWildcardTraverser.traverseAny(Unknown Source)<br> at org.apache.xerces.impl.xs .traversers.XSDAbstractParticleTraverser.traverseSeqChoice(Unknown Source)<br> at org.apache.xerces.impl.xs .traversers.XSDAbstractParticleTraverser.traverseSequence(Unknown Source) <br> at org.apache.xerces.impl.xs .traversers.XSDComplexTypeTraverser.processComplexContent(Unknown Source)<br> at org.apache.xerces.impl.xs .traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(Unknown Source) <br> at org.apache.xerces.impl.xs .traversers.XSDComplexTypeTraverser.traverseGlobal(Unknown Source)<br> at org.apache.xerces.impl.xs.traversers .XSDHandler.getGlobalDecl(Unknown Source)<br>   ; at org.apache.xerces.impl.xs.traversers.XSDElementTraverser .traverseNamedElement (Unknown Source)<br> at org.apache .xerces.impl.xs.traversers.XSDElementTraverser.traverseGlobal(Unknown Source)<br > at org.apache.xerces.impl.xs .traversers.XSDHandler.traverseSchemas(Unknown Source)<br> at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)<br> at org.apache.xerces.impl.xs .XMLSchemaLoader.loadSchema(Unknown Source)<br> at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar (Unknown Source)<br> at org.apache .xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)<br> at org.apache.xerces.impl.xs .XMLSchemaValidator.startElement(Unknown Source)<br> at org.apache.xerces.impl.XMLNSDocumentScannerImpl .scanStartElement (Unknown Source)<br> at org.apache .xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook (Unknown Source)<br> at org.apache .xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch (Unknown Source)<br> at org.apache .xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)<br> at org.apache.xerces.parsers .XML11Configuration.parse(Unknown Source)<br>   ; at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)<br> at org.apache .xerces.parsers.XMLParser.parse(Unknown Source)<br>   ; at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)<br clear="all"><br>-- <br>~Rajesh.B
|
|
 |