Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-2430

embedded RESTful fileserver do not close files when PUT method is called

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.2.0, 5.3.0
    • 5.6.0
    • Broker
    • None
    • linux 64 bits, but probably not significant

    • Patch Available

    Description

      When doing a massive uploading of blobs with activemq 5.2 (same thing on svn trunk) on the embedded RESTful fileserver, you get a "too many open files" error and the system doesn't work anymore.

      Steps to reproduce :

      • send a BlobMessage with "jms.blobTransferPolicy.uploadUrl=http://127.0.0.1:8161/fileserver/"
      • use "lsof |grep fileserver" command and you will see your uploaded BLOB still open

      The fix seems really easy (works ok for me) :

      • open "RestFilter.java"
      • locate the "doPut()" method
      • change :
         
        try {
            IO.copy(request.getInputStream(), out);
         } catch (IOException e) {
        

      with :

       
      try {
          IO.copy(request.getInputStream(), out);
          out.close();
       } catch (IOException e) {
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            fabien.marty Fabien MARTY
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified