1 2 Previous Next 18 Replies Latest reply on Nov 24, 2016 3:13 PM by Sascha Janz

    LargeMessageControllerImpl memory consumption

    Sascha Janz Master

      We use JBoss 7.1.1 with hornetq 2.2.13.

       

      we use hornetq/jms to transfer files from one application to another.

       

      last week we got two server shut downs due to OutOfMemory

       

      when i look in heapdump i see 200 LargeMessageControllerImpl with packets/outStream still consuming memory. this could not be active sessions, because the system is only used by much less then 200 users.

       

      so try to repoduce this.  i transferred as 230 MB file on my local system and get a heap dump

       

      i the heapdump there are LargeMessageControllerImpl consuming those 230 MB with outStream.

       

      i tried to free those resources but with no luck.

       

      the onMessage code looks like

       

      BytesMessage bm = (BytesMessage) message;
           File outputFile = new File(path....);

            FileOutputStream fileOutputStream = new FileOutputStream(outputFile);

       

           BufferedOutputStream bufferedOutput=null;
           try
           {
            bufferedOutput = new BufferedOutputStream(fileOutputStream, 8192); 
            bm.setObjectProperty("JMS_HQ_SaveStream", bufferedOutput);
           
           }
           finally
           {
           
            fileOutputStream.close();
            bufferedOutput.close();
            bufferedOutput= null;
            fileOutputStream = null ;
           }

       

      any tips what i could do?
          

        1 2 Previous Next