You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Tom Seelbach (JIRA)" <ji...@apache.org> on 2008/02/12 18:03:08 UTC
[jira] Commented: (AXIS2-2968) Out-Of-Memory error on server side -
Use of wsdl4j WSDLDefinition
[ https://issues.apache.org/jira/browse/AXIS2-2968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568213#action_12568213 ]
Tom Seelbach commented on AXIS2-2968:
-------------------------------------
I was trying to use the new memory-reduced WSDL definitions. It seems that some additional changes are needed because not all of the WSDLDefinitionWrapper constructors have access to the "ReduceWSDLMemoryCache" parameters. Various parts of axis2 are not calling a "ReduceWSDLMemoryCache aware" WSDLDefinitionWrapper constructor. Since the needed parameters would be in axis2.xml which is represented by AxisConfiguration which is inside ConfigurationContext, I decided to pass the ConfigurationContext down, eventually to WSDLDefinitionWrapper. The following files are affected:
./kernel/src/org/apache/axis2/wsdl/util/WSDLDefinitionWrapper.java
./kernel/src/org/apache/axis2/wsdl/util/WSDLWrapperReloadImpl.java
./kernel/src/org/apache/axis2/wsdl/util/WSDLWrapperBasicImpl.java
./kernel/src/org/apache/axis2/wsdl/util/WSDLWrapperSaveImpl.java
./metadata/src/org/apache/axis2/jaxws/description/DescriptionFactory.java
./metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
./metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java
./metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java
./metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java
./metadata/test-resources/axis2.xml
./metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java
./metadata/test/org/apache/axis2/jaxws/description/DBCwithReduceWSDLMemoryParmsTests.java
WSDLDefinitionWrapper.java: added constructor with ((Definition def,AxisConfiguration axisConfig)
- factored out "setupMemoryParms(axisConfig)"
- added debug
WSDLWrapperReloadImpl.java, WSDLWrapperBasicImpl.java, WSDLWrapperSaveImpl.java
- in toString() - print class name
- added debug
DescriptionFactory.java
- add createServiceDescriptionFromDBCMap() method with ConfigurationContext parameter.
ServiceDescriptionImpl.java
- add ConfigurationContext to constructor call. Change other constructors to delegate to contructor with configContext
- change calls to WSDL4JWrapper to pass the ConfigurationContext
- added debug to trace exactly which way we construct WSDL4JWrapper
- added debugMemoryParms() method (probably should go in a utility class?
DescriptionFactoryImpl.java
- added createServiceDescriptionFromDBCMap() method with ConfigurationContext parm
- make other createServiceDescriptionFromDBCMap() method delegate to the new one.
- create ServiceDescriptionImpl passing along the ConfigurationContext
DescriptionBuilderComposite.java
- add constructor with ConfigurationContext parm
- added details to toString()
- change call to construct WSDL4JWrapper - pass along ConfigurationContext
WSDL4JWrapper.java
- add constructors with ConfigurationContext parm, and change existing constructors to delegate to them
- added ConfiguationContext as member data. Not sure I like this. Could just store the memory parm settings instead....
- when constructing WSDLDefinitionWrapper, pass along ConfigurationContext
- added debug
axis2.xml
- added memory parms for test
DescriptionFactoryImplTests.java
- changed to call, passing null ConfigurationContext
DBCwithReduceWSDLMemoryParmsTests.java
- test case for this change.
- uses ReduceMemory parms from axis2.xml, contructs DescriptionBuilderComposite, checks to make sure WSDLWrapperReloadImpl.class is constructed
> Out-Of-Memory error on server side - Use of wsdl4j WSDLDefinition
> -----------------------------------------------------------------
>
> Key: AXIS2-2968
> URL: https://issues.apache.org/jira/browse/AXIS2-2968
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Reporter: Ann Robinson
> Assignee: Rich Scheuerle
> Priority: Critical
> Attachments: patch_01.txt, patch_02_part1.txt, patch_03.txt, wsdlFromFileSystem.patch
>
>
> In some server-side environments, there is an out-of-memory problem when
> attempting to handle a large number of JAXWS-based web service applications.
>
> In the test scenario that fails, the server is attempting to load and start
> 100 web service applications. A variety of heap sizes was tried to see if
> a heap size for the server could be found to work, ranging from 1 GB to 4 GB.
> Increasing the heap size did not work - the out-of-memory error continued to
> occur.
> In analyzing the java heap dumps, one of the biggest consumers of the memory
> is with the wsdl4j WSDLDefinition objects. In the test scenario, the
> wsdl4j-related objects consumed about a quarter to a third of the entire heap.
>
> The WSDLDefinition object is a very heavy-weight object, much of which stems
> from its use of the xerces dom objects as underlying support, particularly
> for the schemas.
>
> One area to investigate is the saving of the WSDLDefinition as a Parameter
> in the AxisService's ParameterInclude list so that, if some component needs
> to utilize the WSDLDefinition object, it can be accessed via the AxisService
> object.
>
> Is it possible to reduce the utilization of the WSDLDefinition?
> Some ideas are:
> (a) releasing it when it is no longer needed
> - this might not be possible to determine
>
> (b) putting a wrapper on the WSDLDefinition
> - so that the WSDLDefinition,or a portion of the WSDLDefinition,
> can be released
> - but if the WSDLDefinition is accessed after it was released,
> the wrapper can reload the WSDLDefinition transparently to the
> user
>
> (c) create a layer for caching wsdl-related information
> - this would allow for releasing memory based on some algorithm
> and/or interface that could indicate what's no longer needed
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org