You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Daniel Hsueh <dc...@alumni.uwaterloo.ca> on 2014/12/23 17:57:11 UTC

JaxWsClientProxy responseContext memory leak - any suggestions?

Hello,

I have a CXF application running in tomcat7 that seems to grow in memory
and not release; the bulk of the retained memory (as shown in a jvisualvm
jmap dump) is in the responseContext as seen in this screenshot:
http://i.imgur.com/eX1K6FR.png

Would anyone have suggestions on how to reduce the memory consumption of
the app?  I've never worked with cxf before and am at a loss to remedy the
problem.

Thank you.

-- 
Daniel Hsueh <ma...@alumni.uwaterloo.ca>

RE: JaxWsClientProxy responseContext memory leak - any suggestions?

Posted by Andrei Shakirin <as...@talend.com>.
Hi,

Casting to javax.xml.ws.BindingProvider makes the trick:
Map<String, Object> context = ((javax.xml.ws.BindingProvider) customerService).getResponseContext();

Regards,
Andrei.

> -----Original Message-----
> From: hunter [mailto:grijesh.rajoria@gmail.com]
> Sent: Dienstag, 16. Juni 2015 12:44
> To: users@cxf.apache.org
> Subject: Re: JaxWsClientProxy responseContext memory leak - any suggestions?
> 
> Is there any way to get the responseContext when using jaxws:client in spring ?
> 
> 
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/JaxWsClientProxy-responseContext-memory-
> leak-any-suggestions-tp5752686p5758319.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Re: JaxWsClientProxy responseContext memory leak - any suggestions?

Posted by hunter <gr...@gmail.com>.
Is there any way to get the responseContext when using jaxws:client in spring
?



--
View this message in context: http://cxf.547215.n5.nabble.com/JaxWsClientProxy-responseContext-memory-leak-any-suggestions-tp5752686p5758319.html
Sent from the cxf-user mailing list archive at Nabble.com.

RE: JaxWsClientProxy responseContext memory leak - any suggestions?

Posted by Andrei Shakirin <as...@talend.com>.
Hi,

Could you control which properties causes increasing of responseContext?
Do you use any custom interceptors?

Regards,
Andrei.

> -----Original Message-----
> From: dchsueh@gmail.com [mailto:dchsueh@gmail.com] On Behalf Of Daniel
> Hsueh
> Sent: Dienstag, 23. Dezember 2014 17:57
> To: users
> Subject: JaxWsClientProxy responseContext memory leak - any suggestions?
> 
> Hello,
> 
> I have a CXF application running in tomcat7 that seems to grow in memory and
> not release; the bulk of the retained memory (as shown in a jvisualvm jmap
> dump) is in the responseContext as seen in this screenshot:
> http://i.imgur.com/eX1K6FR.png
> 
> Would anyone have suggestions on how to reduce the memory consumption of
> the app?  I've never worked with cxf before and am at a loss to remedy the
> problem.
> 
> Thank you.
> 
> --
> Daniel Hsueh <ma...@alumni.uwaterloo.ca>

Re: JaxWsClientProxy responseContext memory leak - any suggestions?

Posted by Daniel Kulp <dk...@apache.org>.
> On Jan 5, 2015, at 10:57 AM, Daniel Hsueh <dc...@alumni.uwaterloo.ca> wrote:
> 
> Hello,
> 
> Would anyone have any ideas to help with this memory issue? 

Can you dig into the Response map to see what it’s holding onto?     Also, if you use the client multiple times of many calls, does it grow?   The response context needs to hold onto stuff for the last call that was made. 

You COULD try grabbing the response context and calling clear() on it after you are done with your call to make sure it’s emptied out.   

Dan



> 
> Thank you.
> 
> On Tue, Dec 23, 2014 at 11:57 AM, Daniel Hsueh <dc...@alumni.uwaterloo.ca>
> wrote:
> 
>> Hello,
>> 
>> I have a CXF application running in tomcat7 that seems to grow in memory
>> and not release; the bulk of the retained memory (as shown in a jvisualvm
>> jmap dump) is in the responseContext as seen in this screenshot:
>> http://i.imgur.com/eX1K6FR.png
>> 
>> Would anyone have suggestions on how to reduce the memory consumption of
>> the app?  I've never worked with cxf before and am at a loss to remedy the
>> problem.
>> 
>> Thank you.
>> 
>> --
>> Daniel Hsueh <ma...@alumni.uwaterloo.ca>
>> 
> 
> 
> 
> -- 
> Daniel Hsueh <ma...@alumni.uwaterloo.ca>

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: JaxWsClientProxy responseContext memory leak - any suggestions?

Posted by Daniel Hsueh <dc...@alumni.uwaterloo.ca>.
Hello,

Would anyone have any ideas to help with this memory issue?

Thank you.

On Tue, Dec 23, 2014 at 11:57 AM, Daniel Hsueh <dc...@alumni.uwaterloo.ca>
wrote:

> Hello,
>
> I have a CXF application running in tomcat7 that seems to grow in memory
> and not release; the bulk of the retained memory (as shown in a jvisualvm
> jmap dump) is in the responseContext as seen in this screenshot:
> http://i.imgur.com/eX1K6FR.png
>
> Would anyone have suggestions on how to reduce the memory consumption of
> the app?  I've never worked with cxf before and am at a loss to remedy the
> problem.
>
> Thank you.
>
> --
> Daniel Hsueh <ma...@alumni.uwaterloo.ca>
>



-- 
Daniel Hsueh <ma...@alumni.uwaterloo.ca>