ObjectDB ObjectDB

Memory leak

#1

Hi,

We have a memory leak in our application which seems to be related with ObjectDB.

Basically, we use single instance of EntityManager, which is opened on aplication initialization and closed when the user logs out, as well as EntityManagerFactory. We use em.clear() after every commit and after execution of query. Our classes are enhanced with ObjectDB enhancer.

However, used memory is growing overtime until OutOfMemoryException is thrown on JBoss server.

We use JBoss 7.1.1. and latest ObjectDB version.

We took Heap dump and MemoryAnalyzer Tool tells that the 17 instances of class com.objectdb.jpa.emf took about 38%, and 9 instances of 9 instances of com.objectdb.o.TYM took about 11% of memory, even after performing GC from the JVisualVM (screenshots in the attachment).

Heap dump was taken when the server was idle, so no instances of application was beeing runned.

Our suspect is that nothing from the EntityManager was released to the GC, even after em.close(), and emf.close() were called. Is this correct?


Can you please give your opinion in this?

Thanks!

edit
delete
#2

The heap dump indicates that 9 EntityManagerFactory instances have been created and have not been closed, and ObjectDB is very sensitive for closing every opened EntityManagerFactory.

Please try build 2.5.4_05, which includes a workaround that may solve this issue.

ObjectDB Support
edit
delete
#3

It looks like everything works fine now with the new version of the database.

Thank you very much for your effort!

edit
delete

Reply

To post on this website please sign in.