Ignite在Windows Server 12上开始崩溃

时间:2017-08-17 08:15:35

标签: windows out-of-memory ignite

Apache Ignite 2.1.0在Windows Server 12上启动时使用default-config.xml崩溃。

日志的重要性:

[11:08:16,455] [INFO] [main] [IgniteKernal]操作系统:Windows Server 2012 R2 6.3 x86

[11:08:16,455] [INFO] [main] [IgniteKernal]语言运行时:Java Platform API Specification ver。 1.8

[11:08:16,455] [INFO] [main] [IgniteKernal] VM信息:Java(TM)SE运行时环境1.8.0_131-b11 Oracle Corporation Java HotSpot(TM)服务器VM 25.131-b11

[11:08:16,455] [INFO] [main] [IgniteKernal] VM总内存:0.96GB

...

[11:08:16,455] [INFO] [main] [IgniteKernal] VM参数:[ - Xms1g,-Xmx1g,-XX:+ AggressiveOpts,-XX:MaxMetaspaceSize = 256m,-DIGNITE_QUIET = true,-DIGNITE_SUCCESS_FILE = C:\ Ignite \ apache-ignite-fabric-2.1.0-bin \ work \ ignite_success_d782cfc3-3908-4f42-90c8-33e4eb440de7,-Dcom.sun.management.jmxremote,-Dcom.sun.management.jmxremote.port = 49117 ,-Dcom.sun.management.jmxremote.authenticate = false,-Dcom.sun.management.jmxremote.ssl = false,-DIGNITE_HOME = C:\ Ignite \ apache-ignite-fabric-2.1.0-bin,-DIGNITE_PROG_NAME = ignite.bat]

[11:08:16,455] [INFO] [main] [IgniteKernal]系统缓存的MemoryPolicy大小配置为40 MB。使用MemoryConfiguration.systemCacheMemorySize属性更改设置。

[11:08:16,471] [INFO] [main] [IgniteKernal]配置缓存[在'sysMemPlc'memoryPolicy中:['ignite-sys-cache']]

...

[11:08:18,846] [SEVERE] [exchange-worker-#30%null%] [GridDhtPartitionsExchangeFuture]无法重新初始化本地分区(预定将停止):GridDhtPartitionExchangeId [topVer = AffinityTopologyVersion [topVer = 1,minorTopVer] = 0],nodeId = d7ac488c,evt = NODE_JOINED]

java.lang.OutOfMemoryError     at sun.misc.Unsafe.allocateMemory(Native Method)     在org.apache.ignite.internal.util.GridUnsafe.allocateMemory(GridUnsafe.java:1054)     在org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider.nextRegion(UnsafeMemoryProvider.java:80)     在org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl.addSegment(PageMemoryNoStoreImpl.java:610)     在org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl.start(PageMemoryNoStoreImpl.java:230)     at org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager.startMemoryPolicies(IgniteCacheDatabaseSharedManager.java:194)     at org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager.onActivate(IgniteCacheDatabaseSharedManager.java:949)     在org.apache.ignite.internal.processors.cache.GridCacheSharedContext.activate(GridCacheSharedContext.java:244)     at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:602)     at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager $ ExchangeWorker.body(GridCachePartitionExchangeManager.java:1901)     在org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)     在java.lang.Thread.run(Thread.java:748)

1 个答案:

答案 0 :(得分:1)

使用配置文件

中的代码段解决了问题
    <property name="memoryConfiguration">
        <bean class="org.apache.ignite.configuration.MemoryConfiguration">
            <!-- Setting a name of the default memory policy -->
            <property name="defaultMemoryPolicyName" value="Default_Region"/>
            <!-- Setting the page size to 4 KB -->
            <property name="pageSize" value="4096"/>
            <property name="systemCacheInitialSize" value="#{40 * 1024 * 1024}"/>
            <property name="systemCacheMaxSize" value="#{40 * 1024 * 1024}"/>

            <!-- Defining several memory policies for different memory regions -->
            <property name="memoryPolicies">
                <list>
                    <!--
                        Default memory region that grows endlessly. A cache is bound to this memory region
                        unless it sets another one in its CacheConfiguration.
                    -->
                    <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
                        <property name="name" value="Default_Region"/>
                        <!-- 100 MB memory region with disabled eviction -->
                        <property name="initialSize" value="#{20 * 1024 * 1024}"/>
                        <property name="maxSize" value="#{20 * 1024 * 1024}"/>
                    </bean>

                </list>
            </property>
        </bean>
    </property>