axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5874) Memory leak when trying to getInputStream() from an External Repository data through AXIS
Date Sun, 10 Sep 2017 09:41:00 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-5874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16160281#comment-16160281
] 

Andreas Veithen commented on AXIS2-5874:
----------------------------------------

* The contract of {{DataHandler}} allows multiple calls to {{getInputStream()}}. That means
that requesting the stream and closing it will not free the memory held by the {{DataHandler}}.
* The fact that you get an {{OutOfMemoryError}} in the code that reads the MIME part does
not mean that the (presumed) leak occurs there. You will need to look at a heap dump to determine
where references to the objects involved in the leak are held. There is no a priori reason
to believe that it's Axis2's fault; it may be a problem in your code.
* 1.6.2 is an old release that is no longer supported. You would need to provide steps to
reproduce the problem on a more recent release.

> Memory leak when trying to getInputStream() from an External Repository data through
AXIS
> -----------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5874
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5874
>             Project: Axis2
>          Issue Type: Bug
>          Components: jaxws, wsdl
>    Affects Versions: 1.6.2
>         Environment: Windows 2008
>            Reporter: Nidhin Lazar
>            Priority: Blocker
>
> We are using AXIS WS to connect and download files from an external repository .We are
using SOAP based webservice calls download an object. The API returns a DataHandler object,
from where we are getting the input stream. We have tried closing the inputstream object but
even after the close call we can see that the memory is still holding the stream, and eventually
the client machine is running out of memory.Any help on this would be highly appreciated.
> Our client code is as shown below
> URL url = new URL("http://"+host+"/ws/CntSrvc.svc?wsdl");
> CntSrvc_Svc cService = new CntSrvc_Svc(url);
> CntSrvc cntSrvcClient = cService.getBasicHttpBindingCntSrvc(new MTOMFeature());
> InputStream in = null ;
> in = cntSrvcClient.download(contextIDString).getInputStream();
> // write in to a file.
> //closing the input stream
> if (in != null){
>  in.close(); 
> }
> [Note;] Our client code runs under tomcat container, and this acts as a server to other
services.
> [Note:]We have created a sample client without using AXIS, where our client connecting
to external repository and download content.Here we donot see any memory leak.Our investigation
proves that its when we use AXIS and getinputstream() the memory is leaking, input stream
is not closing.Our current framework demands AXIS hence we would like to get a solution or
workaround for this issue



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message