Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5874

Memory leak when trying to getInputStream() from an External Repository data through AXIS

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Invalid
    • 1.6.2
    • None
    • jaxws, wsdl
    • None
    • Windows 2008

    Description

      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

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            lazern Nidhin Lazar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment