Just in case someone else runs into this issue, I am passing on the 
resolution for this problem. By simply upgrading the JVM to a more recent 
version, the problem went away. It may had been a bug with the 
implementation of the Unsafe class.

Thanks for looking into though.

Odysseas

On Wednesday, February 4, 2015 at 8:39:44 AM UTC-5, Andrey Lomakin wrote:
>
> Odysseas and Sylvain,
> Reason for sure is that RAM from point of view of OS is exhausted. OS 
> returned 0 (NULL) as result of data allocation.
>
> Probably you have some restrictions on memory allocation or merely other 
> applications are running in parallel.
>
> We will avoid such exceptions in 2.1 as Sylvain suggested , if we do not 
> have enough memory we will push data to the disk and will not throw OOM to 
> the client.
>
>
> On Wed, Feb 4, 2015 at 12:50 PM, Odysseas <[email protected] 
> <javascript:>> wrote:
>
>> Andrey,
>> We did not explicitly set the disk cache to a specific value and at the 
>> time that the exception occurred, there was physical memory available in 
>> the system and that is what is puzzling me.
>> Odysseas
>>
>> On Wednesday, February 4, 2015 at 1:19:08 AM UTC-5, Andrey Lomakin wrote:
>>>
>>> It is not heap exception it is off heap exception, your setting for disk 
>>> cache size is bigger than available amount of RAM.
>>> Please decrease it.
>>>
>>> On Wed, Feb 4, 2015 at 2:08 AM, Odysseas <[email protected]> wrote:
>>>
>>>> Hi Luca,
>>>> The JVM had 2.8 GB of heap allocated and it was using about 2.0 GB at 
>>>> the time the exception occurred.
>>>>
>>>> On Tuesday, February 3, 2015 at 6:38:40 PM UTC-5, Lvc@ wrote:
>>>>>
>>>>> How much heap had the JVM?
>>>>>
>>>>> Lvc@
>>>>>
>>>>> On 3 February 2015 at 23:22, Odysseas <[email protected]> wrote:
>>>>>
>>>>>> Following up on my question, there is physical memory available on 
>>>>>> the system when the exception is thrown. I am now suspecting that direct 
>>>>>> memory needs swap space backing for it to be allocated, so is the 
>>>>>> possible 
>>>>>> lack of swap space causing the OOM exceptions?
>>>>>>
>>>>>> On Tuesday, February 3, 2015 at 4:02:57 PM UTC-5, Odysseas wrote:
>>>>>>>
>>>>>>> We are working with OrientDB 2.0.1 and after loading a large number 
>>>>>>> of records, we create indexes and run into the following exception. Do 
>>>>>>> you 
>>>>>>> have any suggestions on what we need to tune to get past the error?
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>> SEVERE: {db=person-db} Exception during index rebuild. Exception was 
>>>>>>> caused by following key/ value pair - key Jayden, value #11:104588. 
>>>>>>> Rebuild 
>>>>>>> will continue from this point.
>>>>>>> com.orientechnologies.orient.core.index.OIndexException: Error 
>>>>>>> during insertion of key in index
>>>>>>> at com.orientechnologies.orient.core.index.OIndexMultiValues.pu
>>>>>>> t(OIndexMultiValues.java:141)
>>>>>>> at com.orientechnologies.orient.core.index.OIndexMultiValues.pu
>>>>>>> t(OIndexMultiValues.java:1)
>>>>>>> at com.orientechnologies.orient.core.index.OIndexAbstract.popul
>>>>>>> ateIndex(OIndexAbstract.java:853)
>>>>>>> at com.orientechnologies.orient.core.index.OIndexAbstract.index
>>>>>>> Cluster(OIndexAbstract.java:920)
>>>>>>> at com.orientechnologies.orient.core.index.OIndexAbstract.rebui
>>>>>>> ld(OIndexAbstract.java:392)
>>>>>>> at com.orientechnologies.orient.core.index.OIndexAbstract.creat
>>>>>>> e(OIndexAbstract.java:225)
>>>>>>> at com.orientechnologies.orient.core.index.OIndexMultiValues.cr
>>>>>>> eate(OIndexMultiValues.java:284)
>>>>>>> at com.orientechnologies.orient.core.index.OIndexMultiValues.cr
>>>>>>> eate(OIndexMultiValues.java:1)
>>>>>>> at com.orientechnologies.orient.core.index.OIndexManagerShared.
>>>>>>> createIndex(OIndexManagerShared.java:169)
>>>>>>> at com.orientechnologies.orient.core.index.OIndexManagerProxy.c
>>>>>>> reateIndex(OIndexManagerProxy.java:79)
>>>>>>> at com.orientechnologies.orient.core.metadata.schema.OClassImpl
>>>>>>> .createIndex(OClassImpl.java:1434)
>>>>>>> at com.orientechnologies.orient.core.sql.OCommandExecutorSQLCre
>>>>>>> ateIndex.execute(OCommandExecutorSQLCreateIndex.java:252)
>>>>>>> at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDel
>>>>>>> egate.execute(OCommandExecutorSQLDelegate.java:64)
>>>>>>> at com.orientechnologies.orient.core.storage.impl.local.OAbstra
>>>>>>> ctPaginatedStorage.executeCommand(OAbstractPaginatedStorage.
>>>>>>> java:1176)
>>>>>>> at com.orientechnologies.orient.core.storage.impl.local.OAbstra
>>>>>>> ctPaginatedStorage.command(OAbstractPaginatedStorage.java:1165)
>>>>>>> at com.orientechnologies.orient.core.command.OCommandRequestTex
>>>>>>> tAbstract.execute(OCommandRequestTextAbstract.java:63)
>>>>>>> at com.tinkerpop.blueprints.impls.orient.OrientGraphCommand.execute(
>>>>>>> OrientGraphCommand.java:48)
>>>>>>> at org.openhie.openempi.entity.dao.orientdb.SchemaManagerAbstract.
>>>>>>> createIndex(SchemaManagerAbstract.java:435)
>>>>>>> at org.openhie.openempi.entity.dao.orientdb.SchemaManagerAbstract.
>>>>>>> createIndexPerAttribute(SchemaManagerAbstract.java:393)
>>>>>>> at org.openhie.openempi.entity.dao.orientdb.SchemaManagerAbstract.
>>>>>>> createIndexes(SchemaManagerAbstract.java:340)
>>>>>>> at org.openhie.openempi.entity.dao.orientdb.SchemaManagerAbstract.
>>>>>>> createIndexes(SchemaManagerAbstract.java:323)
>>>>>>> at org.openhie.openempi.entity.dao.orientdb.IntentMassiveInsert
>>>>>>> Impl.end(IntentMassiveInsertImpl.java:70)
>>>>>>> at org.openhie.openempi.entity.dao.orientdb.EntityDaoOrientdb.d
>>>>>>> eclareIntent(EntityDaoOrientdb.java:97)
>>>>>>> at org.openhie.openempi.entity.impl.RecordManagerServiceImpl.de
>>>>>>> clareIntent(RecordManagerServiceImpl.java:692)
>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>>>>>>> ssorImpl.java:57)
>>>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>>>>>>> thodAccessorImpl.java:43)
>>>>>>> at java.lang.reflect.Method.invoke(Method.java:601)
>>>>>>> at org.springframework.aop.support.AopUtils.invokeJoinpointUsin
>>>>>>> gReflection(AopUtils.java:318)
>>>>>>> at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
>>>>>>> JdkDynamicAopProxy.java:196)
>>>>>>> at com.sun.proxy.$Proxy38.declareIntent(Unknown Source)
>>>>>>> at org.openhie.openempi.loader.SpringEntityLoaderManager.shutdo
>>>>>>> wnConnection(SpringEntityLoaderManager.java:107)
>>>>>>> at org.openhie.openempi.loader.FileLoaderManager.shutdown(FileL
>>>>>>> oaderManager.java:159)
>>>>>>> at org.openhie.openempi.loader.FileLoaderManager.main(FileLoade
>>>>>>> rManager.java:149)
>>>>>>> Caused by: com.orientechnologies.orient.core.index.sbtree.local.
>>>>>>> OSBTreeException: Error during index update with key #11:104588 and 
>>>>>>> value true
>>>>>>> at com.orientechnologies.orient.core.index.sbtreebonsai.local.O
>>>>>>> SBTreeBonsaiLocal.put(OSBTreeBonsaiLocal.java:312)
>>>>>>> at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OI
>>>>>>> ndexRIDContainerSBTree.add(OIndexRIDContainerSBTree.java:135)
>>>>>>> at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OI
>>>>>>> ndexRIDContainerSBTree.add(OIndexRIDContainerSBTree.java:1)
>>>>>>> at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OI
>>>>>>> ndexRIDContainer.add(OIndexRIDContainer.java:125)
>>>>>>> at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OI
>>>>>>> ndexRIDContainer.add(OIndexRIDContainer.java:1)
>>>>>>> at com.orientechnologies.orient.core.index.OIndexMultiValues.pu
>>>>>>> t(OIndexMultiValues.java:133)
>>>>>>> ... 33 more
>>>>>>> Caused by: java.lang.OutOfMemoryError
>>>>>>> at sun.misc.Unsafe.allocateMemory(Native Method)
>>>>>>> at com.orientechnologies.common.directmemory.OUnsafeMemory.allo
>>>>>>> cate(OUnsafeMemory.java:85)
>>>>>>> at com.orientechnologies.common.directmemory.ODirectMemoryPoint
>>>>>>> er.<init>(ODirectMemoryPointer.java:70)
>>>>>>> at com.orientechnologies.orient.core.index.hashindex.local.cach
>>>>>>> e.OWOWCache.cacheFileContent(OWOWCache.java:918)
>>>>>>> at com.orientechnologies.orient.core.index.hashindex.local.cach
>>>>>>> e.OWOWCache.load(OWOWCache.java:417)
>>>>>>> at com.orientechnologies.orient.core.index.hashindex.local.cach
>>>>>>> e.OReadWriteDiskCache.updateCache(OReadWriteDiskCache.java:676)
>>>>>>> at com.orientechnologies.orient.core.index.hashindex.local.cach
>>>>>>> e.OReadWriteDiskCache.doLoad(OReadWriteDiskCache.java:302)
>>>>>>> at com.orientechnologies.orient.core.index.hashindex.local.cach
>>>>>>> e.OReadWriteDiskCache.allocateNewPage(OReadWriteDiskCache.java:331)
>>>>>>> at com.orientechnologies.orient.core.index.sbtreebonsai.local.O
>>>>>>> SBTreeBonsaiLocal.allocateBucket(OSBTreeBonsaiLocal.java:1275)
>>>>>>> at com.orientechnologies.orient.core.index.sbtreebonsai.local.O
>>>>>>> SBTreeBonsaiLocal.splitBucket(OSBTreeBonsaiLocal.java:1029)
>>>>>>> at com.orientechnologies.orient.core.index.sbtreebonsai.local.O
>>>>>>> SBTreeBonsaiLocal.put(OSBTreeBonsaiLocal.java:287)
>>>>>>> ... 38 more
>>>>>>>
>>>>>>>  -- 
>>>>>>
>>>>>> --- 
>>>>>> 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 [email protected].
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>  -- 
>>>>
>>>> --- 
>>>> 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 [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Best regards,
>>> Andrey Lomakin.
>>>
>>>   -- 
>>
>> --- 
>> 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 [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Best regards,
> Andrey Lomakin.
>
>  

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to