9 Replies Latest reply on Aug 21, 2019 8:17 AM by Steven Hawkins

    Teiid queries  not never releasing the memory from heap resulting Garbage collection failures

    Vishnu Swaminathan Newbie

      We have a federated VDB with a Views made from attributes from multiple Oracle data sources. The View results in 2 million records and it involves joining tables with 2 million records from two different data sources(please see example view below). We have several such views. Our Heapsize for the JVM is 24GB.

       

      When we fetch data from these views, the memory keeps growing in heap. The memory never releases back and eventually in a day or two, it reaches the max heap size and at some time results in the following error java.lang.OutOfMemoryError: GC overhead limit exceeded.(Attached HeapDump screenshot after I forced GC, I can share the HeapDump if required)

       

      It appears the memory is not getting released. We haven't explicity enabled any resultset caching and set the default Teiid buffer settings. After we encountered this error, we have played with Teiid buffer sizes like max reserve kb and max memory buffer, but haven't seen much luck .  Trying to find out what settings should we be changing in this scenario and why the memory is not getting released.

       

      Example view view1. All the source tables have more than 2 million records.

       

      CREATE VIEW VIEW1

      (

      C1 bigdecimal(32767),

      C2 bigdecimal(32767),

      C3 bigdecimal(32767),

      C4 bigdecimal(32767),

      C5 string(4000),

      C6 string(4000),

      C7 string(4000),

         CONSTRAINT VIEW1_PK PRIMARY KEY (C1)

      )

      AS

      SELECT DISTINCT

      SRC1T1 .C1,

      SRC2T1.C2,

      SRC1T1.C3,

      SRC1T1.C4,

      SRC3T1.C5,

       

      SRC3T1.C6,

       

      SRC2T1.C7

      FROM

      SRC1.TBL1 SRC1T1 INNER JOIN SRC2.TBL1 SRC2TBL1 ON SRC1T1.C1 = SRC1TBL1.C1

      INNER JOIN SRC3.TBL1  SRC3TBL1 ON SRC1TBL1.C2 = SRC3TBL1.C2

      ;

       

      Heap Dump screenshot: