axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Selvaratnam Uthaiyashankar <uthaiyashan...@gmail.com>
Subject Re: How to fix memory leak in Axis2/C client?
Date Fri, 05 Mar 2010 02:49:38 GMT
On Fri, Mar 5, 2010 at 5:51 AM, Samisa Abeysinghe <samisa@wso2.com> wrote:
>
>
> On Fri, Mar 5, 2010 at 2:29 AM, Hatim Daginawala
> <Hatim.Daginawala@argodata.com> wrote:
>>
>> First of all let me say, I did not mean to offend anyone, undermine the
>> work you do or even complain. If I did, I am sorry.
>
> Sure, I was purely trying to make sure that other users do not misunderstand
> anything.
> And, of course if there are leaks, we got to fix them.
>>
>> Axis is great product and I am using axis2c in a production environment
>> and I am very grateful. Thank you.
>>
>>
>>
>> The reason I say it’s not designed for reuse it precisely because it opens
>> connection on every request. I had to switch to libcurl because I was
>> running out of sockets.
>
> We need to explore this more to find the problem.
> One of the reasons that we wrote libcurl transport was to benefit from the
> power of the library. We need to admit, transport libs is not our key
> strength, rather SOAP engine aspects.
> I think it has been some time since we put some effort to look into
> improving libcurl support.
>>
>> When I  developed my code for 1.4, I did ran into various memory leaks and
>> I did submit patches for it. However, I was able to work around most issues.
>> 1.6 might not have those same issues.
>
> We might want to revisit these in 1.7


+1. Lets have a look at libcurl before 1.7 release.

Regards,
Shankar


> Samisa...
>
>>
>>
>>
>> From: Samisa Abeysinghe [mailto:samisa@wso2.com]
>> Sent: Thursday, March 04, 2010 11:16 AM
>>
>> To: Apache AXIS C User List
>> Subject: Re: How to fix memory leak in Axis2/C client?
>>
>>
>>
>>
>>
>> On Thu, Mar 4, 2010 at 9:51 PM, Hatim Daginawala
>> <Hatim.Daginawala@argodata.com> wrote:
>>
>> No harm in trying. I have been using release 1.5 for over a year now in a
>> very high volume environment.
>>
>>
>>
>> svc_client is not designed to be reused.
>>
>>
>>
>> This is an incorrect statement. We reuse it, and it can be re-used.
>>
>> Here are some of the issues I came across in 1.4/1.5
>>
>> -          It leaks all over the place - For example HTTP headers, you
>> will have to reset all the headers after each use.
>>
>>
>>
>> I do not agree with this either. It does not leak all over the place. It
>> sounds almost as if we have not done anything to fix leaks.
>> This certainly is a misinterpretation and understatement.
>>
>> -          Default HTTP transport opens socket for every request – you
>> have to use libcurl
>>
>> -          libcurl wrapper had some terrible memory leaks – this should
be
>> fixed in 1.6
>>
>>
>>
>> This is true. Because the most used is default http transport.
>>
>> -          axis2c does not have support for proxy, ssl, etc with libcurl
>> transport – there are patches to do this though
>>
>>
>>
>> Again the reason is default is not curl. If you want curl, then you need
>> to do your homework.
>>
>>
>>
>> Samisa...
>>
>>
>>
>> From: Samisa Abeysinghe [mailto:samisa@wso2.com]
>> Sent: Thursday, March 04, 2010 9:29 AM
>>
>> To: Apache AXIS C User List
>>
>> Subject: Re: How to fix memory leak in Axis2/C client?
>>
>>
>>
>>
>>
>> On Thu, Mar 4, 2010 at 8:37 PM, Hatim Daginawala
>> <Hatim.Daginawala@argodata.com> wrote:
>>
>> You probably need to call axiom_node_free_tree on both request and
>> response node before reusing svc_client
>>
>>
>>
>> I do not think so - this will lead to seg faults if I recall right.
>>
>>
>>
>> If you cannot share the code, then the best is to use echo sample and see
>> if it leaks memory and if it does, report issues against that.
>>
>>
>>
>> It is like searching in the dark to talk about this without some concrete
>> code.
>>
>>
>>
>> Samisa...
>>
>>
>>
>>
>>
>> From: Olivier Mengué [mailto:omengue@oxymel.com]
>> Sent: Thursday, March 04, 2010 8:36 AM
>> To: Apache AXIS C User List; Apache AXIS C User List
>> Cc: Axis2/C user
>> Subject: RE : How to fix memory leak in Axis2/C client?
>>
>>
>>
>>
>>
>> Samisa Abeysinghe wrote:
>> >It is hard to tell from the list of methods given. Can you please provide
>> >the code you are using to test? Then we can profile and see where the
>> > leaks
>> >are.
>>
>> As you probably expected, no, I can't.
>>
>> Could you at least tell me if I have a good understanding of the API?
>> Is it my responsability to free the XML trees used in the SOAP exchange?
>>
>> Or if it may be a bug such as AXIS2C-1452?
>>
>> >> * for every call to the service:
>> >>     - I construct the XML request document:
>> >>         + axutil_qname_create()
>> >>         + axiom_element_create_with_qname()
>> >>         + axiom_element_create(), axiom_element_set_text()
>> >>     - axis2c_svc_client_send_receive()
>> >>     - I parse the XML response document:
>> >>         + axis2c_svc_client_get_http_status_code()
>> >>         + axis2c_svc_client_get_last_response_has_fault()
>> >>         + axiom_node_get_n,ext_sibling()
>> >>         + axiom_node_get_node_type()
>> >>         + axiom_node_get_data_element(), axiom_node_get_localname(),
>> >> axiom_node_get_namespace(), axiom_node_get_text()
>> >>
>> >>
>> >> I suspect that either the request XML tree and the response XML tree
>> >> are
>> >> not freed,
>> >> but I've seen nothing in the axis2c_svc_client API to do that.
>> >>
>> >> Which function calls are missing to fix my leak?
>> >>
>> >> Olivier.
>> >>
>>
>> Olivier Mengué
>> Oxymel, France.
>>
>> ________________________________
>>
>> ---------------------------------------------------
>> Confidentiality Notice: This electronic mail transmission is confidential,
>> may be privileged and should be read or retained only by the intended
>> recipient. If you have received this transmission in error, please
>> immediately notify the sender and delete it from your system.
>>
>>
>> --
>> Samisa Abeysinghe
>> Director, Engineering - WSO2 Inc.
>>
>> http://wso2.com/ - "lean . enterprise . middleware"
>>
>> ________________________________
>>
>> ---------------------------------------------------
>> Confidentiality Notice: This electronic mail transmission is confidential,
>> may be privileged and should be read or retained only by the intended
>> recipient. If you have received this transmission in error, please
>> immediately notify the sender and delete it from your system.
>>
>>
>> --
>> Samisa Abeysinghe
>> Director, Engineering - WSO2 Inc.
>>
>> http://wso2.com/ - "lean . enterprise . middleware"
>>
>> ________________________________
>> ---------------------------------------------------
>> Confidentiality Notice: This electronic mail transmission is confidential,
>> may be privileged and should be read or retained only by the intended
>> recipient. If you have received this transmission in error, please
>> immediately notify the sender and delete it from your system.
>
>
> --
> Samisa Abeysinghe
> Director, Engineering - WSO2 Inc.
>
> http://wso2.com/ - "lean . enterprise . middleware"
>



-- 
S.Uthaiyashankar
Software Architect
WSO2 Inc.
http://wso2.com/ - "lean . enterprise . middleware"

---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
For additional commands, e-mail: c-user-help@axis.apache.org


Mime
View raw message