Memory leak on OrientDB2-M3?

100 views
Skip to first unread message

Xander Uiterlinden

unread,
Nov 28, 2014, 10:10:34 AM11/28/14
to orient-...@googlegroups.com
Hi,

We've been using OrientDB2.0 M3 in testing a couple of days now. When using M2 it was running out of memory every other day but since we we're not using connection pooling at that time I thought that could be the reason. Now we've enabled connection pooling and upgraded to M3 it still happens.

See below a screenshot of the objects after reading the hprof file into YourKit. Maybe it rings a bell ? I could send the hprof if you're interested.

Thanks,

Xander

Andrey Lomakin

unread,
Dec 1, 2014, 2:02:51 AM12/1/14
to orient-database
Hi,

Could you send us hprof, it is really interesting.
What is your db size ? What settings do  you use ?

Do you have 3 billions instances of disk cache ???
What is your pattern of db usage ? It seems like you create storage for each operation, what is your typical test which throws OOM.
Could we see it ?



--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Best regards,
Andrey Lomakin.

Xander Uiterlinden

unread,
Dec 1, 2014, 3:27:03 AM12/1/14
to orient-...@googlegroups.com
Hi,

I actually reproduced the issue with a small test. This shows the following exception occurring after create and drop of a database after approx. 138 times. It either throws an exception directly or it hangs at 100% CPU first for a while.

Heap dump file created [703409076 bytes in 4,691 secs]

java.lang.OutOfMemoryError: GC overhead limit exceeded

       at java.util.jar.Attributes.read(Attributes.java:394)


        at java.util.jar.Manifest.read(Manifest.java:199)


        at java.util.jar.Manifest.<init>(Manifest.java:69)


        at java.util.jar.JarFile.getManifestFromReference(JarFile.java:199)


        at java.util.jar.JarFile.getManifest(JarFile.java:180)


        at sun.misc.URLClassPath$JarLoader$2.getManifest(URLClassPath.java:780)


        at java.net.URLClassLoader.defineClass(URLClassLoader.java:422)


        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)


        at java.net.URLClassLoader$1.run(URLClassLoader.java:367)


        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)


        at java.security.AccessController.doPrivileged(Native Method)


        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)


        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)


        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)


        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)


        at com.orientechnologies.orient.core.serialization.OMemoryStream.<clinit>(OMemoryStream.java:51)


        at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.serializeExceptionObject(ONetworkProtocolBinary.java:1623)


        at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.sendError(ONetworkProtocolBinary.java:657)


        at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.sendErrorOrDropConnection(OBinaryNetworkProtocolAbstract.java:238)


        at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:218)


        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:65)




This is the test code:
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import com.orientechnologies.orient.client.remote.OServerAdmin;

public class Test {

 
public static void main(String args[]) throws IOException, InterruptedException {
   
for (int i = 0; i < 1000; i ++) {
       
String dbName = "oom_" + i;
       
OServerAdmin admin = new OServerAdmin("remote:localhost").connect("root","root");
       admin
.createDatabase(dbName, "graph", "plocal");
       admin
.close();
       
System.out.println("created " + dbName);

       admin
= new OServerAdmin("remote:localhost/" + dbName).connect("root","root");
       admin
.dropDatabase("plocal");
       admin
.close();
       
System.out.println("dropped " + dbName);

       
TimeUnit.MILLISECONDS.sleep(2000); // the sleep actually does not make a difference
   
}
 
}
}



I'll create an issue for this.


Xander

Luca Garulli

unread,
Dec 3, 2014, 1:29:51 PM12/3/14
to orient-database
Hi,

Lvc@

Reply all
Reply to author
Forward
0 new messages