Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #26909

    I’m using pd4ml in a production website.
    I constantly get an OutOfMemory at the end of the day, on a 4GB heap.
    I run the dump through the YourKit Profiler and, as you can see from the screenshots, I found lots of pd4ml objects not being finalized properly.

    I might be doing something wrong in the code, but I’m just using a few jsp tags so I don’t see where the error could be.

    The two screenshots show 4GB held by 1M Finalizer instances holding references to 16k instances of org.zefer.html.doc.view.l

    Do you have an idea of the reason this could happen?
    Thank you

    Version details:

    PD4ML Pro 385fx6
    PD4ML Taglib 385fx6
    Ubuntu 12.04.2 LTS (GNU/Linux 3.5.0-27-generic x86_64)
    java version “1.6.0_30”
    OpenJDK Runtime Environment (IcedTea6 1.13.1) (6b30-1.13.1-1ubuntu2~
    OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
    Apache Tomcat/6.0.35

    Code Snippet:


    PD4ML caches objects using soft references in a static hash table. As soon as there is a shortage of RAM, JVM must automatically release such objects and deallocate consumed RAM. If there is no allocation requests, it is up to JVM either to keep the objects cached or garbage-collect them.

    There is an API call pd4ml.clearCache() forces to clean cache (and consumed RAM). The JVM setting -Dpd4ml.cache.enable=false disables caching at all.

    After a particular image is loaded by PD4ML it is also instantiated as Imager object. If AWT also caches images of not – depends on a particular JVM implementation.

    As for me it is suspicious, that the data is accumulated somewhere in the internals sun.awt.image.ToolkitImage.

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘Troubleshooting’ is closed to new topics and replies.