OrientDB Проблема с низкой кучей памяти - PullRequest
0 голосов
/ 18 марта 2019

Я установил OrientDB на сервере, который имеет 8 ГБ памяти.

При выполнении некоторых запросов я получаю сообщение об ошибке памяти с низкой кучей, но странным является то, что если я повторно выполню тот же запрос, то он будет выполнен идеально.

Согласно документации, я пытался установить низкую кучу и большую кэш-память. У меня есть система Windows, и я настроил параметры времени выполнения как "-Xmx800m -Dstorage.diskCache.bufferSize = 7200"

Вот ошибка, которую я получаю:

2019-03-18 00:26:30:699 INFO  {db=AA-Dev} Error executing query (386666118): OCommandExecutorSQLSelect [text=SELECT expand($result) LET $userPost = (SELECT FROM post WHERE in('HasPost').UserId = '87af74b5-a7e6-4262-bc4b-ed9637aef153' AND out('HasInterest').Name = 'investment'), $country = (SELECT expand(out('LocatedOn').Country) FROM $userPost), $keywords = (SELECT expand(out('HasKeyword').Name) FROM $userPost), $a = (SELECT FROM post WHERE out('HasInterest').Name = 'crowdfund' AND out(HasIndustry).@rid IN (SELECT expand(out('HasIndustry').@rid) FROM $userPost) AND IsDraft = false AND IsActive = true AND in('HasPost').UserId <> '87af74b5-a7e6-4262-bc4b-ed9637aef153'), $b = (SELECT FROM $a WHERE out('LocatedOn').Country IN $country), $c = (SELECT FROM $b WHERE out('HasKeyword').Name IN $keywords), $collection = unionall($c, $b, $a), $result = (SELECT distinct(PostId) FROM $collection)]Exception `170C0E86` in storage `plocal:C:/orientdb-community-2.2.32/orientdb-community-2.2.32/databases/AA-Dev`: 2.2.32 (build 68709d4478301dc6af110621f13fb176e4ca98b0, branch 2.2.x)
com.orientechnologies.orient.core.exception.OCommandExecutionException: Cannot execute query "SELECT expand(out('HasIndustry').@rid) FROM $userPost": low heap memory
    DB name="AA-Dev"
    at com.orientechnologies.orient.core.sql.OSoftQueryResultList.throwCanExecuteException(OSoftQueryResultList.java:688)
    at com.orientechnologies.orient.core.sql.OSoftQueryResultList.checkQueue(OSoftQueryResultList.java:78)
    at com.orientechnologies.orient.core.sql.OSoftQueryResultList.size(OSoftQueryResultList.java:88)
    at java.util.Collections$SynchronizedCollection.size(Unknown Source)
    at com.orientechnologies.orient.core.sql.query.OBasicResultSet.size(OBasicResultSet.java:66)
    at com.orientechnologies.common.collection.OMultiValue.getSize(OMultiValue.java:87)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:397)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:97)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:384)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:88)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:384)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:97)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilter.evaluate(OSQLFilter.java:105)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.evaluateRecord(OCommandExecutorSQLResultsetAbstract.java:422)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.filter(OCommandExecutorSQLResultsetAbstract.java:412)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearchRecord(OCommandExecutorSQLSelect.java:609)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.serialIterator(OCommandExecutorSQLSelect.java:1638)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.fetchFromTarget(OCommandExecutorSQLSelect.java:1585)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:522)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:485)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:70)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3417)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3335)
    at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:78)
    at com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery.run(OSQLAsynchQuery.java:74)
    at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:102)
    at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.query(ODatabaseDocumentTx.java:760)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.assignLetClauses(OCommandExecutorSQLResultsetAbstract.java:443)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:515)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:485)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:70)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3417)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3335)
    at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:78)
    at com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery.run(OSQLAsynchQuery.java:74)
    at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33)
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.command(ONetworkProtocolBinary.java:1566)
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:664)
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.sessionRequest(ONetworkProtocolBinary.java:398)
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.execute(ONetworkProtocolBinary.java:217)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:82)
Exception `170C0E86` in storage `plocal:C:/orientdb-community-2.2.32/orientdb-community-2.2.32/databases/AA-Dev`: 2.2.32 (build 68709d4478301dc6af110621f13fb176e4ca98b0, branch 2.2.x)
com.orientechnologies.orient.core.exception.OCommandExecutionException: Cannot execute query "SELECT expand(out('HasIndustry').@rid) FROM $userPost": low heap memory
    DB name="AA-Dev"
    at com.orientechnologies.orient.core.sql.OSoftQueryResultList.throwCanExecuteException(OSoftQueryResultList.java:688)
    at com.orientechnologies.orient.core.sql.OSoftQueryResultList.checkQueue(OSoftQueryResultList.java:78)
    at com.orientechnologies.orient.core.sql.OSoftQueryResultList.size(OSoftQueryResultList.java:88)
    at java.util.Collections$SynchronizedCollection.size(Unknown Source)
    at com.orientechnologies.orient.core.sql.query.OBasicResultSet.size(OBasicResultSet.java:66)
    at com.orientechnologies.common.collection.OMultiValue.getSize(OMultiValue.java:87)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:397)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:97)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:384)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:88)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:384)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition.evaluate(OSQLFilterCondition.java:97)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilter.evaluate(OSQLFilter.java:105)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.evaluateRecord(OCommandExecutorSQLResultsetAbstract.java:422)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.filter(OCommandExecutorSQLResultsetAbstract.java:412)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearchRecord(OCommandExecutorSQLSelect.java:609)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.serialIterator(OCommandExecutorSQLSelect.java:1638)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.fetchFromTarget(OCommandExecutorSQLSelect.java:1585)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:522)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:485)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:70)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3417)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3335)
    at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:78)
    at com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery.run(OSQLAsynchQuery.java:74)
    at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:102)
    at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.query(ODatabaseDocumentTx.java:760)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.assignLetClauses(OCommandExecutorSQLResultsetAbstract.java:443)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:515)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:485)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:70)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3417)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3335)
    at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:78)
    at com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery.run(OSQLAsynchQuery.java:74)
    at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33)
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.command(ONetworkProtocolBinary.java:1566)
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:664)
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.sessionRequest(ONetworkProtocolBinary.java:398)
    at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.execute(ONetworkProtocolBinary.java:217)
    at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:82)

Раньше я только увеличивал объем памяти кучи, используя "-Xmx4096m", но все равно не повезло. Я неправильно установил параметры времени выполнения?

...