axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From R J Scheuerle Jr <sc...@us.ibm.com>
Subject Re: [axis2] Revisiting the Proposal for fixing out-of-memory error JIRA axis2-2968
Date Wed, 19 Sep 2007 14:59:13 GMT
Thanks Ann.

Let me try to summarize to see if I understand this change:

The new patch is the WSDL Wrapper "interface" without any implementation.
There are no changes to the loading, unloading or logic.

When WSDL4J completes their "reloading" implementation, then we can easily
plug in the
implementation under the WSDL Wrapper.

And if someone wants an interim solution, they can provide their own
implementation.

Sounds like a good plan for me.  Do you have an outlook when the WSDL4J
implementation will be ready ?

Thanks for the thorough explanation.

Rich Scheuerle
IBM Web Services
Apache Axis2 (scheu@apache.org)
512-838-5115  (IBM TL 678-5115)

"Amila Suriarachchi" <amilasuriarachchi@gmail.com> wrote on 09/19/2007
03:19:09 AM:

>

> On 9/19/07, Ann Robinson <robinsona@us.ibm.com> wrote:
> Hi, all,
> This is a re-send of the note with the correct [axis2] prefix in the
> subject line.
>
> I have updated the proposed fix for the out-of-memory error that occurs
on
> the server in some environments, and I would be interested in getting
some
> feedback on the updated proposal.
>
> Some background:
> ----------------
> This out-of-memory (OOM) error happens on the server in some
> environments where there is
> a large number of applications.
>
> At deployment time, when the applications are loaded, the
> AxisService objects are created.
> For those applications where the loading ends up invoking the
> WSDL11ToAxisServiceBuilder,
> the wsdl is read in and saved as a Parameter on the AxisService
> object.  As the applications
> are loaded, an OOM happens before requests start flowing.
>
> In analyzing the java heap dumps, one of the biggest consumers of memory
> is with the wsdl4j WSDLDefinition objects.  The heap dump indicates that
> the WSDLDefinition uses the xerces dom for underlying support,
particularly
> for schemas.  This makes the WSDLDefinition very heavy-weight.
>
> The heap dump also shows that the WSDLDefinition objects of concern are
the
> ones being saved in the AxisService object's ParameterInclude list.
> Comments in
> the code (WSDL11ToAxisServiceBuilder) indicate that this is done so that,
if
> some component needs to utilize the WSDLDefinition, the component can
access
> it via a Parameter in the AxisService object.
>
> The initial proposed fix was to use a light-weight wrapper on the
> WSDL4J's WSDL definition
> object in order to release resources and reload WSDL if needed.
> Prototypes of this fix
> did resolve the OOM. This solution, however, had drawbacks with
> repect to custom WSDL locators
> and ?WSDL support.
>
>
> Updated Proposed Fix:
> ---------------------
>
> I have been working with the WSDL4J team on ways to reduce the
> memory footprint
> of the WSDL definition implementation.  This means that a newer
> version of WSDL4J
> will need to be picked up by AXIS2 when the updated WSDL4J becomes
available.
>
> In the meantime, for Axis2, I would like to propose using a wrapper on
the
> WSDL4J's WSDLDefinition object for the following reasons:
>         - to keep changes to the WSDL4J implementation from impacting
users
>           (especially those components that expect to access a
WSDLDefinition
>            from the parameter include list in the AxisService)
>         - to allow certain environments to take advantage of changesin
WSDL4J,
>           (eg. new APIs, new steps, or catch exceptions) to reduce
> memory footprint
>         - to have the option of doing an intermediate solution for
> certain environments
>            while preserving current behavior of the Axis2 kernel for
> the rest of the
>            environments
>
> The difference in this solution from the previously proposed solution is
that
>         - no resources will be released
>         - no need to try to reload the original WSDL (so we don't
> have to worry about
>            custom WSDL locators or ?WSDL support)
>
> This wrapper on the WSDLDefinition would do the following:
>         - implement the wsdl definition interface and delegate the
> methods to the actual
>           WSDL4J wsdl definition implementation that is being wrapped
>         - provide tracing for debug situations
>         - perform new steps to reduce memory footprint only when
> needed for certain environments
>                - - this could be controlled via a configuration
> parameter so that the default
>                     behavior is the same as current behavior
>
> what is the parameter you have used for that? As I saw in your patch
> you have changed the existing classes with out checking for a parameter.
> As I saw this change is effect to the ?wsdl and wsdl2java tool and
> wsdl11Axisservice builder at deployment time.
> does all these cases work properly with imports and includes?
> if these working features are preserved I am ok with this change.

>
>                 - - this could include serializing/deserializing the
> WSDL4J's WSDLDefinition
>                      object if the WSDLDefinition can be serialized
>
>
> Comments?
> - Thanks, Ann
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
Mime
View raw message