orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

An out of memory exception is thrown when deserialzing a link lazily in Orient 1.6.4 plocal embedded database

Open aruld opened this issue 12 years ago • 3 comments

When trying to lazily access a link that has ORecordBinary, using the code below, it loads the binary record under certain cases which causes OOM.

data.blankOrSampleNotProvided = (template.field(TEMPLATEDOC__BINARY_LINK, OType.LINK) == null);
ODatabaseException occured : Error on retrieving record #3:24 (cluster: default)

play.exceptions.JavaExecutionException: Error on retrieving record #3:24 (cluster: default)
        at play.jobs.Job.call(Job.java:155)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
Caused by: com.orientechnologies.orient.core.exception.ODatabaseException: Error on retrieving record #3:24 (cluster: default)
        at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.read(ODatabaseRaw.java:250)
        at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeReadRecord(ODatabaseRecordAbstract.java:706)
        at com.orientechnologies.orient.core.tx.OTransactionNoTx.loadRecord(OTransactionNoTx.java:63)
        at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.load(ODatabaseRecordTx.java:202)
        at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.load(ODatabaseRecordTx.java:38)
        at com.orientechnologies.orient.core.record.impl.ODocument.field(ODocument.java:532)
        at com.orientechnologies.orient.core.record.impl.ODocument.field(ODocument.java:600)
        at models.Orient.buildBorrowerDocumentMetadata(Orient.java:3189)
        ... 6 more
Caused by: java.lang.OutOfMemoryError: Java heap space
        at org.iq80.snappy.SnappyDecompressor.uncompress(SnappyDecompressor.java:44)
        at org.iq80.snappy.Snappy.uncompress(Snappy.java:37)
        at com.orientechnologies.orient.core.serialization.compression.impl.OSnappyCompression.uncompress(OSnappyCompression.java:39)
        at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster.readRecord(OPaginatedCluster.java:574)
        at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.readRecord(OLocalPaginatedStorage.java:1160)
        at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.readRecord(OLocalPaginatedStorage.java:1140)
        at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.read(ODatabaseRaw.java:244)
        at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeReadRecord(ODatabaseRecordAbstract.java:706)
        at com.orientechnologies.orient.core.tx.OTransactionNoTx.loadRecord(OTransactionNoTx.java:63)
        at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.load(ODatabaseRecordTx.java:202)
        at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.load(ODatabaseRecordTx.java:38)
        at com.orientechnologies.orient.core.record.impl.ODocument.field(ODocument.java:532)
        at com.orientechnologies.orient.core.record.impl.ODocument.field(ODocument.java:600)
        at models.Orient.buildBorrowerDocumentMetadata(Orient.java:3189)
        at play.jobs.Job.doJobWithResult(Job.java:50)
        at play.jobs.Job.call(Job.java:146)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

aruld avatar Mar 04 '14 17:03 aruld

Can you fix this in Orient 1.6.5 as well?

aruld avatar Mar 06 '14 18:03 aruld

But it is released. We can fix it in new version only.

On Thu, Mar 6, 2014 at 8:10 PM, Arul Dhesiaseelan [email protected]:

Can you fix this in Orient 1.6.5 as well?

— Reply to this email directly or view it on GitHubhttps://github.com/orientechnologies/orientdb/issues/2089#issuecomment-36917778 .

Best regards, Andrey Lomakin.

Orient Technologies the Company behind OrientDB

andrii0lomakin avatar Mar 06 '14 19:03 andrii0lomakin

But the new version is still in RC and our production server is on 1.6.4.

aruld avatar Mar 07 '14 18:03 aruld