Hi again, Any advice if upgrading CXF is problematic due to other 3rd party tools having a dependency on the old version?
Is this a known issue in 2.2.X? Thanks, Brad Douglas -----Original Message----- From: Sergey Beryozkin [mailto:[email protected]] Sent: Friday, August 26, 2016 8:01 PM To: [email protected] Subject: Re: CXF 2.2.12 Memory Issue (XMLSchema) Hi CXF 3.0.10 (Java 6+) and CXF 3.1.7 (Java7+) are the latest CXF releases - try either of them. Cheers, Sergey On 26/08/16 01:24, Brad wrote: > Hi > > > > This is my first post, so apologies if I don't follow protocol. > > > > We've got a client with a very large, complex, _statefull_ WSDL > interface we've had to build against using CFX 2.2.12. We're running > into big problems with memory when we try to scale the solution to > larger numbers of users, because each session is taking around 100MB of memory. > > > > Looking at the jmap output with MAT I can see that most of the memory > appears to be used by org.apache.ws.commons.schema.XmlSchema objects > holding Java representations of the XSD: > > > > Class Name > | Shallow Heap | Retained Heap | Percentage > > ---------------------------------------------------------------------- > ------ > ------------------------------------------------- > > class org.apache.cxf.BusFactory @ 0x725cefd60 > | 24 | 288,197,368 | 24.19% > > |- java.util.WeakHashMap @ 0x725cefdd0 > | 56 | 288,197,144 | 24.19% > > | |- java.util.WeakHashMap$Entry[16] @ 0x725cefe08 > | 80 | 288,197,040 | 24.19% > > | | |- java.util.WeakHashMap$Entry @ 0x7392cd478 > | 40 | 144,098,760 | 12.09% > > | | | |- org.apache.cxf.bus.CXFBusImpl @ 0x73aaa08b8 > | 56 | 144,098,680 | 12.09% > > | | | | |- org.apache.cxf.wsdl11.WSDLManagerImpl @ 0x73aade0c0 > | 40 | 143,827,152 | 12.07% > > | | | | | |- org.apache.cxf.common.util.CacheMap @ 0x73f26bf50 > | 24 | 103,164,672 | 8.66% > > | | | | | | |- org.apache.cxf.service.model.ServiceSchemaInfo @ > 0x743cfce50| 24 | 103,164,136 | 8.66% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x73f2aacb8 > | 120 | 20,287,400 | 1.70% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x741f53c18 > | 120 | 14,611,264 | 1.23% > > | | | | | | | |- org.apache.xerces.dom.DeferredDocumentImpl @ > 0x73b5a64e0 | 192 | 11,852,864 | 0.99% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x73b5a6258 > | 120 | 3,218,816 | 0.27% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x7432110d0 > | 120 | 3,077,088 | 0.26% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x73b22b730 > | 120 | 2,965,424 | 0.25% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x73edaf680 > | 120 | 2,618,728 | 0.22% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x73ee15e70 > | 120 | 2,480,848 | 0.21% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x73cde3a50 > | 120 | 2,453,208 | 0.21% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x73cb881b0 > | 120 | 1,997,872 | 0.17% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x741cf8798 > | 120 | 1,912,032 | 0.16% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x73d9e1c20 > | 120 | 1,835,784 | 0.15% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x73af69110 > | 120 | 1,712,048 | 0.14% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x743b856c0 > | 120 | 1,431,512 | 0.12% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x73b89cdd0 > | 120 | 1,407,688 | 0.12% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x741ad5290 > | 120 | 1,381,272 | 0.12% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x74287d8c8 > | 120 | 1,285,424 | 0.11% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x742cc5f80 > | 120 | 1,277,136 | 0.11% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x741d8abb0 > | 120 | 1,263,248 | 0.11% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x74320c8e8 > | 120 | 1,259,544 | 0.11% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x7428b39b0 > | 120 | 1,257,264 | 0.11% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x7426d38c8 > | 120 | 1,229,744 | 0.10% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x743266500 > | 120 | 1,159,976 | 0.10% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x741faf868 > | 120 | 1,099,520 | 0.09% > > | | | | | | | |- org.apache.ws.commons.schema.XmlSchema @ 0x7420e7470 > | 120 | 1,024,232 | 0.09% > > . > > > > I thought perhaps I could get the schema objects out of memory if I > forced the schema checks to be disabled, but this didn't help: > > ((BindingProvider)mPortType).getRequestContext().put("schema-validatio > n-enab > led", "false"); > > > > So, I'm hoping for some guidance on how to proceed. Is there a way to > actually prevent the schemas from being needed in memory? If not, is > there a way to have only one instance in memory that can be used to > validate all the request/response messages? Are the any guidelines > for how to build clients to statefull services in CXF? > > > > Thanks very much in advance for your help. Please let me know if I > need to provide more information. > > > > Kind regards, > > Brad > > -- Sergey Beryozkin Talend Community Coders http://coders.talend.com/
