私は私が得たOrientdb Javaヒープエラー
for(i = 1 to 1000)
{
DB_Name = getRandomString()
createGraphDb(DB_Name) using OServerAdmin : if db do not exist
gFactory = OrientGraphFactory(DB_Name) : if db exist
graph = OrientGraphFactory.getTx()
previousEvent = null
for(j=1 to 1000)
{
currentEvent = getrandomString()
if(previousEvent and currentEvent != null)
{
- create Vertex named currentVertex and edges between them
- (from previous to current event)
}
else
{
create vertex named current event
}
previousEvent = currentEvent
}
graph.shutdown()
}
シングルスレッドのシステム上で次の須藤コードでトランスナショナルグラフ
を使用してOrientdb 2.2.10上でテストを実行しました私の外側ループの数回繰り返した後の次の例外。
Exception in thread "Thread-0" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at java.lang.String.substring(Unknown Source)
at java.lang.String.split(Unknown Source)
at java.lang.String.split(Unknown Source)
at com.orientechnologies.orient.core.config.OStorageConfiguration.fromStream(OStorageConfiguration.java:268)
at com.orientechnologies.orient.core.config.OStorageConfiguration.fromStream(OStorageConfiguration.java:497)
at com.orientechnologies.orient.core.config.OStorageConfiguration.load(OStorageConfiguration.java:207)
at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:330)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:257)
at com.orientechnologies.orient.core.db.OPartitionedDatabasePool$DatabaseDocumentTxPooled.internalOpen(OPartitionedDatabasePool.java:445)
at com.orientechnologies.orient.core.db.OPartitionedDatabasePool.openDatabase(OPartitionedDatabasePool.java:308)
at com.orientechnologies.orient.core.db.OPartitionedDatabasePool.acquire(OPartitionedDatabasePool.java:263)
at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.<init>(OrientBaseGraph.java:144)
at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.<init>(OrientTransactionalGraph.java:78)
at com.tinkerpop.blueprints.impls.orient.OrientGraph.<init>(OrientGraph.java:135)
at com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.getTx(OrientGraphFactory.java:119)
私のsudoコードまたはOrientDbに問題はありませんか?
もっと良い方法がある場合は、お手数ですがお勧めします。
ありがとうございます!
ヒープサイズは-xmx512mです。 この種のアプリケーションに適したヒープサイズは何ですか? –