What is your xmx setting and did you force a gc prior to taking the heap dump?
On your db have you checked if there are any long running transactions On 7 Feb 2018 5:44 pm, "cocorossello" <cocorosse...@gmail.com> wrote: > Hi, > > We are having some memory problems in our applications. We are using tomee > 7.0.4 with eclipselink, no second cache level. Most of the application are > @ApplicationScoped. > > Transaction is managed by container (JTA), no extended transactions at all, > everything we do with persistence is through the entity manager, which is > always injected with: > @PersistenceContext(unitName = "travelcPU") > private EntityManager entityManager; > > > I have isolated one production server, and waited until all sessions are > dead and then flushed all caches and then I took a heapdump. It's still > 1.6Gb, even with no information, I think it's quite big. > > I can see in the heapdump some 22K > org.apache.openejb.persistence.JtaEntityManager . And then (And I'm not > sure > if it's related to JtaEntityManager) a lot of QueryBasedValueHolder which > are in fact holding references to a lot of our domain objects. > > So, my question is, shouldn't those JtaEntityManager be cleared on GC? I > think that they don't hold references to the eclipselink EnityManager, so > the problem probably comes from another part, but can you confirm? > > Thanks in advance. > > > > -- > Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users- > f979441.html >