Return-Path: Delivered-To: apmail-axis-c-user-archive@www.apache.org Received: (qmail 52482 invoked from network); 4 Mar 2010 14:13:23 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Mar 2010 14:13:23 -0000 Received: (qmail 45757 invoked by uid 500); 4 Mar 2010 14:13:12 -0000 Delivered-To: apmail-axis-c-user-archive@axis.apache.org Received: (qmail 45727 invoked by uid 500); 4 Mar 2010 14:13:12 -0000 Mailing-List: contact c-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache AXIS C User List" Delivered-To: mailing list c-user@axis.apache.org Received: (qmail 45719 invoked by uid 500); 4 Mar 2010 14:13:12 -0000 Delivered-To: apmail-ws-axis-c-user@ws.apache.org Received: (qmail 45716 invoked by uid 99); 4 Mar 2010 14:13:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Mar 2010 14:13:12 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [209.85.222.197] (HELO mail-pz0-f197.google.com) (209.85.222.197) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Mar 2010 14:13:03 +0000 Received: by pzk35 with SMTP id 35so1439444pzk.28 for ; Thu, 04 Mar 2010 06:12:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.82.9 with SMTP id f9mr5186621rvb.293.1267711960347; Thu, 04 Mar 2010 06:12:40 -0800 (PST) In-Reply-To: <9C55040DA84D3D4C936A896505A1F64E01066901@mail2.oxymelfr.com> References: <9C55040DA84D3D4C936A896505A1F64E01066901@mail2.oxymelfr.com> Date: Thu, 4 Mar 2010 19:42:40 +0530 Message-ID: Subject: Re: How to fix memory leak in Axis2/C client? From: Samisa Abeysinghe To: Apache AXIS C User List Cc: "Axis2/C user" Content-Type: multipart/alternative; boundary=000e0cd146f812f4150480fa3139 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd146f812f4150480fa3139 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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. Samisa... 2010/3/4 Olivier Mengu=E9 > Hi, > > I have an Axis2/C client that does multiple calls to the same web service= . > So I'm reusing the same axis2_svc_client object. > The WSDL was too complex for the WSDL code generator, so I had to create > the code myself. > > The client call works fine. > However my problem is I have a memory leak in every calls to the service. > > I have the following calls to Axis: > * init: > - axutil_env_create_all() > - axis2_svc_client_create() > - axis2_options_create() > - axis2_options_set_to() > - axis2_options_set_soap_version() > - axis2_svc_client_set_proxy() > - axis2_svc_client_set_options() > * done: > - axis2_svc_client_free() > - axutil_env_free > * 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. > --=20 Samisa Abeysinghe Director, Engineering - WSO2 Inc. http://wso2.com/ - "lean . enterprise . middleware" --000e0cd146f812f4150480fa3139 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It is hard to tell from the list of methods given. Can you please provide t= he code you are using to test? Then we can profile and see where the leaks = are.=A0

Samisa...

2010= /3/4 Olivier Mengu=E9 <omengue@oxymel.com>

Hi,

I have an Axis2/C client that does multiple calls to the same web service.<= br> So I'm reusing the same axis2_svc_client object.
The WSDL was too complex for the WSDL code generator, so I had to create th= e code myself.

The client call works fine.
However my problem is I have a memory leak in every calls to the service.
I have the following calls to Axis:
* init:
=A0=A0=A0 - axutil_env_create_all()
=A0=A0=A0 - axis2_svc_client_create()
=A0=A0=A0 - axis2_options_create()
=A0=A0=A0 - axis2_options_set_to()
=A0=A0=A0 - axis2_options_set_soap_version()
=A0=A0=A0 - axis2_svc_client_set_proxy()
=A0=A0=A0 - axis2_svc_client_set_options()
* done:
=A0=A0=A0 - axis2_svc_client_free()
=A0=A0=A0 - axutil_env_free
* for every call to the service:
=A0=A0=A0 - I construct the XML request document:
=A0=A0=A0=A0=A0=A0=A0 + axutil_qname_create()
=A0=A0=A0=A0=A0=A0=A0 + axiom_element_create_with_qname()
=A0=A0=A0=A0=A0=A0=A0 + axiom_element_create(), axiom_element_set_text() =A0=A0=A0 - axis2c_svc_client_send_receive()
=A0=A0=A0 - I parse the XML response document:
=A0=A0=A0=A0=A0=A0=A0 + axis2c_svc_client_get_http_status_code()
=A0=A0=A0=A0=A0=A0=A0 + axis2c_svc_client_get_last_response_has_fault()
=A0=A0=A0=A0=A0=A0=A0 + axiom_node_get_n,ext_sibling()
=A0=A0=A0=A0=A0=A0=A0 + axiom_node_get_node_type()
=A0=A0=A0=A0=A0=A0=A0 + axiom_node_get_data_element(), axiom_node_get_local= name(), axiom_node_get_namespace(), axiom_node_get_text()


I suspect that either the request XML tree and the response XML tree are no= t 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.




--
Samisa Abeysinghe
D= irector, Engineering - WSO2 Inc.

http:/= /wso2.com/ - "lean . enterprise . middleware"
--000e0cd146f812f4150480fa3139--