8 Replies Latest reply: Jul 13, 2012 10:51 AM by mannamal RSS

    ORDImage thumbnail generation: JAVA_POOL_SIZE too small

    630530
      Hello,

      I have the following problem: When generating a thumbnail for an ORDImage using the processCopy() method, it works fine for a file size up to ~3 or ~4MB. However, I uploaded a jpg image of 7.6MB and let the thumbnail be automatically (stored procedure) be generated. For that image, an exception is raised:

      ORA-29400: data cartridge error IMG-00003: exhausted memory while processing image.

      Now, I read that increasing the JAVA_POOL_SIZE would solve the problem. So I tried various settings between 24 (Standard) and 96MB. But even the 96MB setting was not enough, the exception was raised again. Do you know what would be a good JAVA_POOL_SIZE setting for an image of such a size? On top of that, I cannot predict how big the images will be, that will be uploaded later on. Is there another way to solve this without increasing JAVA_POOL_SIZE to an astronomic value? If a thumbnail generation for a 3MB image works with a 24MB Java pool size, and generation for a 7MB image doesn't work with 96MB, then there is clearly no linear memory increase. That's my worry.

      Thanks in advance, I'd really appreciate your help.

      Best regards,
      Martin
        • 1. Re: ORDImage thumbnail generation: JAVA_POOL_SIZE too small
          251301
          Martin,

          Can you tell us what version of the database you are using? Please include patchset level. e.g, 10.2.0.3

          Thanks,
          Rob
          • 2. Re: ORDImage thumbnail generation: JAVA_POOL_SIZE too small
            630530
            Hello,

            I am using version 10.2.0.3 of Oracle.

            Thanks and best regards,
            Martin
            • 3. Re: ORDImage thumbnail generation: JAVA_POOL_SIZE too small
              251301
              Martin,

              There is a table in the file ord/im/admin/README.txt which indicates the maximum image sizes that Multimedia can decode (read) or encode(write) for various image formats.
              I'm including that part of the file below (10.2.0.3 version). Note, that tuning the JAVA_POOL_SIZE will not change this maximum values. Also, in 11g the limit for decoding JFIF (jpg) format images has been raised to 46000x46000.


              Rob
              ===========================================
              Image processing

              Oracle interMedia provides image processing functions that change image
              content. For example, you can scale and crop an image or convert it to
              a different file format. Processing an image requires Oracle interMedia
              to interpret the pixel values of the image, which is often processor
              and memory intensive. Subsequently, Oracle interMedia may not be able
              to successfully process images that it can successfully store. The
              maximum image size that interMedia can process depends on the image
              format and the system platform.

              Table 1 shows the maximum image size, expressed in pixel dimensions of
              width x height, that Oracle interMedia can process for various image
              formats on a 32bit platform. Table 2 shows the same limits for a 64bit
              platform.

              In both Table 1 and Table 2, a limit of 3300x3300 means that any image
              can be processed so that the product of its width and height is less
              than or equal to the product of 3300 and 3300 (10890000).

              Note: The values in Table 1 and Table 2 are conservative limits. They
              do not reflect the fact that the space required is a function of image
              format, content format, and compression format nor do they reflect
              future product development efforts.

              Table 1. Maximum image size for processing, 32bit platform.
              ------------------------------------------------------------

              ImageFormat decoding(reading) encoding(writing)
              BMP 4700 x 4700 Unlimited (subject to resource constraints)
              FPIX 4700 x 4700 No write support
              GIFF 8000 x 8000 4700x4700
              JFIF 4700 x 4700 4700x4700
              PCXF 4700 x 4700 No write support
              PGMF 8000 x 8000 Unlimited (subject to resource constraints)
              PICT 4700 x 4700 10000x10000
              PNGF 4700 x 4700 4700x4700
              PNM/PPM 4700 x 4700 Unlimited (subject to resource constraints)
              RASF 4700 x 4700 No write support
              TGAF 4700 x 4700 10000x10000
              TIFF* up to 2GB up to 2GB(subject to resource constraints)

              *For each single strip(block or page) in a TIFF image, up to 4700x4700.

              Table 2. Maximum image size for processing, 64bit platform.*
              -------------------------------------------------------------

              ImageFormat decoding(reading) encoding(writing)
              BMP 9600 x 9600 Unlimited (subject to resource constraints)
              FPIX 9600 x 9600 No write support
              GIFF 16300 x 16300 9600 x 9600
              JFIF 9600 x 9600 9600 x 9600
              PCXF 9600 x 9600 No write support
              PGMF 16300 x 16300 Unlimited (subject to resource constraints)
              PICT 9600 x 9600 20000x20000
              PNGF 9600 x 9600 9600 x 9600
              PNM/PPM 9600 x 9600 Unlimited (subject to resource constraints)
              RASF 9600 x 9600 No write support
              TGAF 9600 x 9600 20000x20000
              TIFF** up to 2GB up to 2GB(subject to resource constraints)

              * The limits on 64bit platforms are calculated values, not empirical
              measurements.

              **For each single strip(block or page) in a TIFF image, up to 9600x9600.
              • 4. Re: ORDImage thumbnail generation: JAVA_POOL_SIZE too small
                251301
                Martin,

                If you have a support contract, there are metalink notes that can help. Let me know.

                However, the above limits in pixel dimension will always apply. Note that the numbers are not exact to the last pixel but are close approximations of absolute limits.

                Rob
                • 5. Re: ORDImage thumbnail generation: JAVA_POOL_SIZE too small
                  user11269279
                  I have some problem, when try to run applyWatermark on image in shared server connection mode. (in dedicated mode works fine)

                  ORA-29400: data cartridge error
                  IMG-00003: exhausted memory while processing image
                  IMG-003: out of memory in (native) awt jpeg decode
                  ORA-06512: at "ORDSYS.ORDIMG_PKG", line 1460
                  ORA-06512: at "ORDSYS.ORDIMAGE", line 211
                  ORA-06512: at line 37

                  The complete test here: https://docs.google.com/open?id=0B0jDbRwf7R2QaE5qM3NacjVnUmM



                  select pool, name, bytes
                  2 from v$sgastat
                  3           WHERE POOL = 'java pool';

                  POOL NAME BYTES
                  ------------ -------------------------- ----------
                  java pool free memory 783360320
                  java pool JOXLE 52125696
                  java pool joxs heap 1919232
                  java pool ioc_make_sub2 1455552
                  • 6. Re: ORDImage thumbnail generation: JAVA_POOL_SIZE too small
                    mannamal
                    Have you looked at the image size limitations described in $ORACLE_HOME/ord/im/admin/README.txt as described above? Are your images within those limits?
                    • 7. Re: ORDImage thumbnail generation: JAVA_POOL_SIZE too small
                      user11269279
                      of course, image is 760 x 681 Pixels, 2.07 KB
                      watermark is 100 x 140 Pixels, 8.03 KB
                      • 8. Re: ORDImage thumbnail generation: JAVA_POOL_SIZE too small
                        mannamal
                        Since it works fine in dedicated mode, can you check the following:

                        - Can you check your PGA and ensure that it is not used up by something else?

                        And,

                        - Are you able to do other operations on this image (such as use processCopy to convert to a different format)?
                        - Are you able to create thumbnails for other images - is this the only image that is failing or are all images failing?