Search code examples
orientdb

Can't start OrientDB Server


I installed OrientDB 2.2.0 on my server but can't start it running server.sh script. Previous version started fine on the server and the current version is running on my notebook. The server is a droplet from Digital Ocean with Ubuntu 15.10 32-bit. The error I get is below.

Invalid maximum direct memory size: -XX:MaxDirectMemorySize=512g The specified size exceeds the maximum representable size. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

Update The problem was with -XX:MaxDirectMemorySize=512g. I changed it to -XX:MaxDirectMemorySize=512m and the error disappeared. The problem now is that the server tries to start but gives me the message below:

Creating the system database 'OSystem' for current server [OSystemDatabase]Exception in thread "main" java.lang.OutOfMemoryError: Direct buffer memory at java.nio.Bits.reserveMemory(Bits.java:693) at java.nio.DirectByteBuffer.(DirectByteBuffer.java:123) at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311) at com.orientechnologies.common.directmemory.OByteBufferPool.allocateBuffer(OByteBufferPool.java:309) at com.orientechnologies.common.directmemory.OByteBufferPool.acquireDirect(OByteBufferPool.java:228) at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.cacheFileContent(OWOWCache.java:1255) at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.load(OWOWCache.java:617) at com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache.updateCache(O2QCache.java:1200) at com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache.doLoad(O2QCache.java:439) at com.orientechnologies.orient.core.storage.cache.local.twoq.O2QCache.allocateNewPage(O2QCache.java:489) at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperation.commitChanges(OAtomicOperation.java:426) at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperationsManager.endAtomicOperation(OAtomicOperationsManager.java:420) at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent.endAtomicOperation(ODurableComponent.java:118) at com.orientechnologies.orient.core.storage.impl.local.paginated.OPaginatedCluster.create(OPaginatedCluster.java:197) at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.addClusterInternal(OAbstractPaginatedStorage.java:3349) at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doAddCluster(OAbstractPaginatedStorage.java:3330) at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.create(OAbstractPaginatedStorage.java:381) at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.create(OLocalPaginatedStorage.java:120) at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.create(ODatabaseDocumentTx.java:378) at com.orientechnologies.orient.server.OSystemDatabase.init(OSystemDatabase.java:106) at com.orientechnologies.orient.server.OSystemDatabase.(OSystemDatabase.java:42) at com.orientechnologies.orient.server.OServer.initSystemDatabase(OServer.java:1217) at com.orientechnologies.orient.server.OServer.activate(OServer.java:343) at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)


Solution

  • (Posted on behalf of the OP).

    Everything is okay now. I just changed -XX:MaxDirectMemorySize=512m to -XX:MaxDirectMemorySize=2g.