Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • jcs-2.0-beta-1
    • jcs-2.0-beta-1
    • Indexed Disk Cache
    • None

    Description

      When JCS shutdown with CompressingSerializer
      I got following OutOfMemoryError

      java.lang.OutOfMemoryError
      Exception in thread "CacheEventQueue.QProcessor-com_nannet_jettiger_om_AttributeOption" java.lang.OutOfMemoryError
      at java.util.zip.Deflater.init(Native Method)
      at java.util.zip.Deflater.<init>(Deflater.java:169)
      at java.util.zip.Deflater.<init>(Deflater.java:186)
      at org.apache.commons.jcs.utils.zip.CompressionUtil.compressByteArray(CompressionUtil.java:133)

      Here is a patch
      ( Details here : http://www.devguli.com/blog/eng/java-deflater-and-outofmemoryerror/ )

      Index: zip/CompressionUtil.java
      ===================================================================
      — zip/CompressionUtil.java (revision 1626113)
      +++ zip/CompressionUtil.java (working copy)
      @@ -150,6 +150,7 @@
      bos.write( buf, 0, count );
      }

      + compressor.end();
      bos.close();

      // Get the compressed data

      Attachments

        Activity

          tv Thomas Vandahl added a comment -

          Applied slightly modified fix.

          tv Thomas Vandahl added a comment - Applied slightly modified fix.
          tv Thomas Vandahl added a comment -

          Close after release

          tv Thomas Vandahl added a comment - Close after release

          People

            tv Thomas Vandahl
            youngho Youngho Cho
            Votes:
            0 Vote for this issue
            Watchers:
            Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                In order to see discussions, first confirm access to your Slack account(s) in the following workspace(s): ASF