OrientDB:尝试还原数据库备份时获取OLowDiskSpaceException

时间:2016-04-27 11:49:59

标签: orientdb

我备份了我的数据库,现在我正在升级到v2.1.16。 我已经在本地Vagrant虚拟服务器上测试了我的备份和恢复例程,一切都很顺利。

我现在正在尝试在我的Amazon AWS服务器上运行相同的过程,并且由于OLowDiskSpaceException,该过程失败。

以下是我收到的消息:

Started import of database 'remote:localhost/mydatabase' from /home/ubuntu/orientdb_
update_16.04.27.11.10.+0000.gz...
Non merge mode (-merge=false): removing all default non security classesError on
 database import happened just before line 0, column 1
com.orientechnologies.orient.core.exception.OLowDiskSpaceException: Error occurr
ed while executing a write operation to database 'mydatabase' due to limited free sp
ace on the disk (-26 MB). The database is now working in read-only mode. Please
close the database (or stop OrientDB), make room on your hard drive and then reo
pen the database. The minimal required space is 100 MB. Required space is now se
t to 100MB (you can change it by setting parameter storage.diskCache.diskFreeSpa
ceLimit) .
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginat
edStorage.checkLowDiskSpaceAndFullCheckpointRequests(OAbstractPaginatedStorage.j
ava:2890)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginat
edStorage.updateRecord(OAbstractPaginatedStorage.java:943)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.exe
cuteSaveRecord(ODatabaseDocumentTx.java:2005)
        at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTra
nsactionNoTx.java:159)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.sav
e(ODatabaseDocumentTx.java:2568)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.sav
e(ODatabaseDocumentTx.java:121)
        at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocumen
t.java:1768)
        at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocumen
t.java:1764)
        at com.orientechnologies.orient.core.metadata.schema.OSchemaShared$1.cal
l(OSchemaShared.java:1213)
        at com.orientechnologies.orient.core.db.OScenarioThreadLocal.executeAsDi
stributed(OScenarioThreadLocal.java:71)
        at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.saveI
nternal(OSchemaShared.java:1208)
        at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.relea
seSchemaWriteLock(OSchemaShared.java:642)
        at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.relea
seSchemaWriteLock(OSchemaShared.java:631)
        at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.dropC
lass(OSchemaShared.java:557)
        at com.orientechnologies.orient.core.metadata.schema.OSchemaProxy.dropCl
ass(OSchemaProxy.java:156)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDropClass.ex
ecute(OCommandExecutorSQLDropClass.java:122)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.exe
cute(OCommandExecutorSQLDelegate.java:90)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginat
edStorage.executeCommand(OAbstractPaginatedStorage.java:1547)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginat
edStorage.command(OAbstractPaginatedStorage.java:1528)
        at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract
.execute(OCommandRequestTextAbstract.java:67)
        at com.orientechnologies.orient.server.network.protocol.binary.ONetworkP
rotocolBinary.command(ONetworkProtocolBinary.java:1323)
        at com.orientechnologies.orient.server.network.protocol.binary.ONetworkP
rotocolBinary.executeRequest(ONetworkProtocolBinary.java:400)
        at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNe
tworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:223)
        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:
77)

Error: com.orientechnologies.orient.core.db.tool.ODatabaseExportException: Error
 on importing database 'mydatabase' from file: /home/ubuntu/orientdb_update_16.04.27
.11.10.+0000.gz

Error: com.orientechnologies.orient.core.exception.OLowDiskSpaceException: Error
 occurred while executing a write operation to database 'mydatabase' due to limited
free space on the disk (-26 MB). The database is now working in read-only mode.
Please close the database (or stop OrientDB), make room on your hard drive and t
hen reopen the database. The minimal required space is 100 MB. Required space is
 now set to 100MB (you can change it by setting parameter storage.diskCache.disk
FreeSpaceLimit) .

奇怪的是我有足够的可用空间。运行'df -h'返回:

Filesystem      Size  Used Avail Use% Mounted on
udev            492M   12K  492M   1% /dev
tmpfs           100M  336K   99M   1% /run
/dev/xvda1      7.8G  2.2G  5.2G  30% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none            497M     0  497M   0% /run/shm
none            100M     0  100M   0% /run/user

为什么OrientDB确信我的可用空间不足100MB,而实际上我有超过5GB的空间?

编辑:这是我的配置

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<orient-server>
    <handlers>
        <handler class="com.orientechnologies.orient.graph.handler.OGraphServerHandler">
            <parameters>
                <parameter value="true" name="enabled"/>
                <parameter value="50" name="graph.pool.max"/>
            </parameters>
        </handler>
        <handler class="com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin">
            <parameters>
                <parameter value="${DISTRIBUTED}" name="enabled"/>
                <parameter value="${ORIENTDB_HOME}/config/distributed-db-config.json" name="configuration.db.default"/>
                <parameter value="${ORIENTDB_HOME}/config/hazelcast.xml" name="configuration.hazelcast"/>
            </parameters>
        </handler>
        <handler class="com.orientechnologies.orient.server.handler.OJMXPlugin">
            <parameters>
                <parameter value="false" name="enabled"/>
                <parameter value="true" name="profilerManaged"/>
            </parameters>
        </handler>
        <handler class="com.orientechnologies.orient.server.handler.OAutomaticBackup">
            <parameters>
                <parameter value="false" name="enabled"/>
                <parameter value="4h" name="delay"/>
                <parameter value="backup" name="target.directory"/>
                <parameter value="${DBNAME}-${DATE:yyyyMMddHHmmss}.zip" name="target.fileName"/>
                <parameter value="9" name="compressionLevel"/>
                <parameter value="1048576" name="bufferSize"/>
                <parameter value="" name="db.include"/>
                <parameter value="" name="db.exclude"/>
            </parameters>
        </handler>
        <handler class="com.orientechnologies.orient.server.handler.OServerSideScriptInterpreter">
            <parameters>
                <parameter value="true" name="enabled"/>
                <parameter value="SQL" name="allowedLanguages"/>
            </parameters>
        </handler>
        <handler class="com.orientechnologies.orient.server.token.OrientTokenHandler">
            <parameters>
                <parameter value="false" name="enabled"/>
                <parameter value="" name="oAuth2Key"/>
                <parameter value="60" name="sessionLength"/>
                <parameter value="HmacSHA256" name="encryptionAlgorithm"/>
            </parameters>
        </handler>
        <handler class="com.orientechnologies.orient.server.plugin.livequery.OLiveQueryPlugin">
            <parameters>
                <parameter value="false" name="enabled"/>
            </parameters>
        </handler>
    </handlers>
    <network>
        <sockets>
            <socket implementation="com.orientechnologies.orient.server.network.OServerSSLSocketFactory" name="ssl">
                <parameters>
                    <parameter value="false" name="network.ssl.clientAuth"/>
                    <parameter value="config/cert/orientdb.ks" name="network.ssl.keyStore"/>
                    <parameter value="password" name="network.ssl.keyStorePassword"/>
                    <parameter value="config/cert/orientdb.ks" name="network.ssl.trustStore"/>
                    <parameter value="password" name="network.ssl.trustStorePassword"/>
                </parameters>
            </socket>
            <socket implementation="com.orientechnologies.orient.server.network.OServerSSLSocketFactory" name="https">
                <parameters>
                    <parameter value="false" name="network.ssl.clientAuth"/>
                    <parameter value="config/cert/orientdb.ks" name="network.ssl.keyStore"/>
                    <parameter value="password" name="network.ssl.keyStorePassword"/>
                    <parameter value="config/cert/orientdb.ks" name="network.ssl.trustStore"/>
                    <parameter value="password" name="network.ssl.trustStorePassword"/>
                </parameters>
            </socket>
        </sockets>
        <protocols>
            <protocol implementation="com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary" name="binary"/>
            <protocol implementation="com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpDb" name="http"/>
        </protocols>
        <listeners>
            <listener protocol="binary" socket="default" port-range="2424-2430" ip-address="0.0.0.0"/>
            <listener protocol="http" socket="default" port-range="2480-2490" ip-address="0.0.0.0">
                <commands>
                    <command implementation="com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetStaticContent" pattern="GET|www GET|studio/ GET| GET|*.htm GET|*.html GET|*.xml GET|*.jpeg GET|*.jpg GET|*.png GET|*.gif GET|*.js GET|*.css GET|*.swf GET|*.ico GET|*.txt GET|*.otf GET|*.pjs GET|*.svg GET|*.json GET|*.woff GET|*.woff2 GET|*.ttf GET|*.svgz" stateful="false">
                        <parameters>
                            <entry value="Cache-Control: no-cache, no-store, max-age=0, must-revalidate\r\nPragma: no-cache" name="http.cache:*.htm *.html"/>
                            <entry value="Cache-Control: max-age=120" name="http.cache:default"/>
                        </parameters>
                    </command>
                    <command implementation="com.orientechnologies.orient.graph.server.command.OServerCommandGetGephi" pattern="GET|gephi/*" stateful="false"/>
                </commands>
                <parameters>
                    <parameter value="utf-8" name="network.http.charset"/>
                    <parameter value="true" name="network.http.jsonResponseError"/>
                </parameters>
            </listener>
        </listeners>
    </network>
    <storages/>
    <users>
        <user resources="*" password="..." name="root"/>
        <user resources="connect,server.listDatabases,server.dblist" password="guest" name="guest"/>
    </users>
    <properties>
        <entry value="1" name="db.pool.min"/>
        <entry value="50" name="db.pool.max"/>
        <entry value="true" name="profiler.enabled"/>
        <entry value="info" name="log.console.level"/>
        <entry value="fine" name="log.file.level"/>
    </properties>
</orient-server>

0 个答案:

没有答案