You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by nttspes <ma...@nttdata.com> on 2014/12/05 12:58:10 UTC

Memory leak problem using JBOSSWS-CXF 4.3.2

Hi all,in our environment (JBoss EAP 6.1), we have a web-application that
does a large utilization of web - services calls.We use JAX-WS (embedded in
our JDK 1.6.30) to generate clients, and to perform web services calls.Above
an example of our source code to perform calls:here we get the client:
public static RichiestaVariazioneAnagraficaServiceClient
getRichiestaVariazioneAnagraficaServiceClient()			throws
MalformedURLException {		URL newEndpoint = new
URL(RichiestaVariazioneAnagraficaServiceClientLocation);		QName qname = new
QName(			
"http://wsdl.codere.it/sel2soa/ws/richiestaVariazioneAnagraficaService",			
"RichiestaVariazioneAnagraficaServiceClient");		return new
RichiestaVariazioneAnagraficaServiceClient(newEndpoint, qname);	}
and here we perform the call
richiestaVariazioneAnagraficaServiceClient =
ClientServiceFactory.getRichiestaVariazioneAnagraficaServiceClient();                   
richiestaVariazioneAnagraficaServiceClient.getRichiestaVariazioneAnagraficaServicePort().annulla(richiestaVariazioneAnagrafica,user);
we don't use any cache mechanism, every time we need to call a web-service,
we perform a new constructor of the object.we are experiencing serious
problems of memory leak in our environment (every day, the old gen memory of
the JVM is going full and we have to restart the application server once per
day).We performed an heap dump of the JVM, and we noticed that almost the
100% of our old gen memory (8.5 GB) is occupied by apche CXF class
BusHolder. Above I post the results of the dump operation
•org.apache.cxf.BusFactory$BusHolderFirst 10 of 113 objects » 113 2,712
8,556,145,120 88.81% •org.apache.cxf.bus.extension.ExtensionManagerBusAll 5
objects » 5 280 373,659,072 3.88% •org.jboss.cache.DataContainerImplAll 2
objects » 2 96 108,659,896 1.13% •java.lang.ThreadFirst 10 of 159 objects »
159 17,808 51,979,048 0.54% 
We use default configuration of jbossws-cxf libraries, and as said, in
clients we use Jax WS clients (not CXF clients).Maybe we have to perform any
explicit operation in the BUS object before to do the calls?Any help would
be appreciated,regards.



--
View this message in context: http://cxf.547215.n5.nabble.com/Memory-leak-problem-using-JBOSSWS-CXF-4-3-2-tp5751974.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Memory leak problem using JBOSSWS-CXF 4.3.2

Posted by nttspes <ma...@nttdata.com>.
Hi and thank you for the answer.

We use the default strategy (THREAD_BUS) for bus management and this seems
to be the reason of our memory problem.

The threads are reused for different users, and we do not use the safest
approach with try/catch block (as described in the CXF document).

Instead of adding the try/catch block to every web service call, we thought
to use the "Thread context classloader bus strategy" (TCCL_BUS).

Do you think that this strategy (TCCL_BUS) is the most correct to use in a
web application context?

Thanks

Bye



--
View this message in context: http://cxf.547215.n5.nabble.com/Memory-leak-problem-using-JBOSSWS-CXF-4-3-2-tp5751974p5752075.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Memory leak problem using JBOSSWS-CXF 4.3.2

Posted by Alessio Soldano <as...@redhat.com>.
Few comments:
1) consider getting in touch the Red Hat support, as you're using JBoss EAP
2) if you're using JBoss EAP 6.1 you're likely not using version 
4.3.2.Final of JBossWS (unless you manually modified your EAP instance, 
which move you in an unsupported scenario @ Red Hat). This is relevant 
because..
3) ... starting from JBossWS 4.2.2 you have some options for controlling 
how WS clients are linked to CXF Bus instances, which might simply be 
the reason of your memory issues. Read more at 
https://docs.jboss.org/author/display/JBWS/Apache+CXF+integration#ApacheCXFintegration-BusselectionstrategiesforJAXWSclients

Alessio

On 05/12/14 12:58, nttspes wrote:
> Hi all,in our environment (JBoss EAP 6.1), we have a web-application that
> does a large utilization of web - services calls.We use JAX-WS (embedded in
> our JDK 1.6.30) to generate clients, and to perform web services calls.Above
> an example of our source code to perform calls:here we get the client:
> public static RichiestaVariazioneAnagraficaServiceClient
> getRichiestaVariazioneAnagraficaServiceClient()			throws
> MalformedURLException {		URL newEndpoint = new
> URL(RichiestaVariazioneAnagraficaServiceClientLocation);		QName qname = new
> QName(			
> "http://wsdl.codere.it/sel2soa/ws/richiestaVariazioneAnagraficaService",			
> "RichiestaVariazioneAnagraficaServiceClient");		return new
> RichiestaVariazioneAnagraficaServiceClient(newEndpoint, qname);	}
> and here we perform the call
> richiestaVariazioneAnagraficaServiceClient =
> ClientServiceFactory.getRichiestaVariazioneAnagraficaServiceClient();
> richiestaVariazioneAnagraficaServiceClient.getRichiestaVariazioneAnagraficaServicePort().annulla(richiestaVariazioneAnagrafica,user);
> we don't use any cache mechanism, every time we need to call a web-service,
> we perform a new constructor of the object.we are experiencing serious
> problems of memory leak in our environment (every day, the old gen memory of
> the JVM is going full and we have to restart the application server once per
> day).We performed an heap dump of the JVM, and we noticed that almost the
> 100% of our old gen memory (8.5 GB) is occupied by apche CXF class
> BusHolder. Above I post the results of the dump operation
> •org.apache.cxf.BusFactory$BusHolderFirst 10 of 113 objects » 113 2,712
> 8,556,145,120 88.81% •org.apache.cxf.bus.extension.ExtensionManagerBusAll 5
> objects » 5 280 373,659,072 3.88% •org.jboss.cache.DataContainerImplAll 2
> objects » 2 96 108,659,896 1.13% •java.lang.ThreadFirst 10 of 159 objects »
> 159 17,808 51,979,048 0.54%
> We use default configuration of jbossws-cxf libraries, and as said, in
> clients we use Jax WS clients (not CXF clients).Maybe we have to perform any
> explicit operation in the BUS object before to do the calls?Any help would
> be appreciated,regards.
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Memory-leak-problem-using-JBOSSWS-CXF-4-3-2-tp5751974.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Alessio Soldano
Web Service Lead, JBoss