You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "John D. Ament" <jo...@apache.org> on 2019/01/02 20:16:51 UTC

Re: RE: Memory usage while working with SOAP Client Proxies

So it turns out that memory wasn't actually growing.  Instead, the openshift deployment we were using was based on a very low metaspace sizing with a hard upper limit.  This was missed, and I'm not sure why they put this limit in but they do.  We see steady memory usage now after giving it a slight bump (30%).

John

On 2018/12/25 21:39:35, Andrei Shakirin <as...@talend.com> wrote: 
> Hi,
> 
> I find strange that memory usage grows. Could you provide a short code snippet how you invoke the client?
> 
> As a solution: in most of cases the client proxies are thread safe and can be reused for concurrent calls - it can improve performance and memory in your case.
> If you are applying request specific settings in ((BindingProvider)proxy).getRequestContext(), it is possible to activate thread local context:
> ((BindingProvider)proxy).getRequestContext().put("thread.local.request.context", "true");
> 
> Take a look into http://cxf.apache.org/faq.html#FAQ-AreJAX-WSclientproxiesthreadsafe? For the further details.
> 
> Regards,
> Andrei.
> 
> > -----Original Message-----
> > From: John D. Ament [mailto:johndament@apache.org]
> > Sent: Dienstag, 18. Dezember 2018 05:31
> > To: users@cxf.apache.org
> > Subject: Memory usage while working with SOAP Client Proxies
> >
> > I'm using CXF 3.2.7 to communicate with SOAP services.  I generate client stubs
> > using wsdl2java.  My applicates run on Kubernetes and we use pretty small
> > deployments.  We recently saw that at times we run out of metaspace and can
> > see higher memory usage after a few invocations of the soap client.
> >
> > Based on JAX-WS recommendations, I use the service as a per request model,
> > and throw away the service when the request is done; no concurrency.
> > However based on my findings it seems like new classes are being defined with
> > each invocation.  Is there a way to tell CXF to reuse the class definition instead
> > of creating a new one per invocation?
> >
> > Thanks,
> >
> > John
> As a recipient of an email from Talend, your contact personal data will be on our systems. Please see our contacts privacy notice at Talend, Inc. <https://www.talend.com/contacts-privacy-policy/>
> 
> 
>