You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Aditya Gujrathi (JIRA)" <ji...@apache.org> on 2010/04/20 11:40:41 UTC

[jira] Updated: (CXF-2772) CLONE -OutOfMemoryError with many service endpoints

     [ https://issues.apache.org/jira/browse/CXF-2772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aditya Gujrathi updated CXF-2772:
---------------------------------

               Labels: TomcatWS  (was: jbossws)
    Affects Version/s: 2.2.6
                           (was: 2.2.5)
          Environment: Windows XP, Sun JDK 1.6, Tomcat 6.0.20  (was: Windows 7 x64 Sun JDK 1.6.0_17-b04), Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mod;
IBM J9 JDK 64bit IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr5
JBoss 5.1.0.GA + JBossWS-CXF 3.2.2.GA)
          Description: 
I am deploying 5 WAR files in my Tomcat server. They together expose multiple endpoints (60+), each of which publish a simple WSDL.

When the server is started, performance with many concurrent service calls degrades and memory consumption increases steadily, ultimately leading to an OutOfMemoryException.

In a simple test it showed that simply displaying the service endpoints exposed WSDL in the browser is sufficient to trigger the OutOfMemoryError. Earlier, our application was using JAXWS and it used to work fine.

I will attach some logs\screenshots using a JVM memory analyzer tool soon so as to provide more details.

  was:
I am deploying an EAR in JBoss which exposes many (approx. 120) endpoints, each of those publish a simple WSDL (2 services with 1 parameter) - demo attached, if necessary I can add a private attachment with the real world EAR.
When invoking these service endpoints, CXF always scans the entire EAR and (re)builds the service endpoint registry.

Performance with many (10-20) concurrent service calls degrades and memory consumption increases steadily, ultimately leading to an OutOfMemoryException in JBoss. It seems the endpoints cannot be found in the cache and so the entire registry is rebuilt.

In a simple test it showed that simply displaying the service endpoints exposed WSDL is sufficient to trigger the problematic behaviour:
{code:title=JBoss server.log|borderStyle=solid}
2010-04-06 10:47:34,861 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Invoking init method  'publish' on bean with name 'Vvpvzfpr'
2010-04-06 10:47:34,862 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] Creating Service {http://vvpvzfpr.vvp.ta2mig.itsv.at/}VvpvzfprService from class at.itsv.ta2mig.vvp.vvpvzfpr.IVvpvzfpr
2010-04-06 10:47:34,868 INFO  [org.apache.cxf.endpoint.ServerImpl] Setting the server's publish address to be http://127.0.0.1:8080/ta2mig-vvptest1-ear-ta2mig-vvptest1-service-BUILD/Vvpvzfpr
2010-04-06 10:47:34,871 INFO  [org.apache.cxf.common.injection.ResourceInjector] failed to resolve resource at.itsv.ta2mig.vvp.vvpvzfpr.Vvpvzfpr/connectionFactory
2010-04-06 10:47:34,872 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Finished creating instance of bean 'Vvpvzfpr'
{code}

This is for every service at every call, please ignore the "failed to resolve resource ..." as the datasource is not available in the local test environment.

Metro does not show this behaviour and reacts very fast with minimum memory consumption, but we cannot easily switch the entire web service stack at this time and I don't believe CXF has such a problem with many service endpoints... however since even calling the WSDL from JBoss' web interface triggers the problem, the app cannot be blamed...

Memory analysis with Eclipse MAT shows that the class org.apache.cxf.common.util.CacheMap grows excessively large, will attach some screenshots (also tested with jVisualVM) and logs later.

Possibly related bugs:

Memory Leak in WSDLManagerImpl - SchemaCacheMap
CXF-1621 
Memory leak due to literal keys in WSDLDefinition map
CXF-1639
performance of repeated calls to jaxws.Service.createPort is poor, jaxb context is created every time
CXF-850


          Component/s:     (was: Bus)

> CLONE -OutOfMemoryError with many service endpoints
> ---------------------------------------------------
>
>                 Key: CXF-2772
>                 URL: https://issues.apache.org/jira/browse/CXF-2772
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.2.6
>         Environment: Windows XP, Sun JDK 1.6, Tomcat 6.0.20
>            Reporter: Aditya Gujrathi
>
> I am deploying 5 WAR files in my Tomcat server. They together expose multiple endpoints (60+), each of which publish a simple WSDL.
> When the server is started, performance with many concurrent service calls degrades and memory consumption increases steadily, ultimately leading to an OutOfMemoryException.
> In a simple test it showed that simply displaying the service endpoints exposed WSDL in the browser is sufficient to trigger the OutOfMemoryError. Earlier, our application was using JAXWS and it used to work fine.
> I will attach some logs\screenshots using a JVM memory analyzer tool soon so as to provide more details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.