如何解决Windows 2019 上堆外持久性存储的 Apache Ignite OOM 错误
在Windows 2019 64 位 上启动Ignite 时,我们遇到OOM 错误。我们正在使用 48GB 的堆外存储。当我们将堆外大小减少到 30 GB 时,它工作正常。我们正在使用本机持久性。持久化位置是默认的。我检查了安装 Ignite 的磁盘空间,它有超过 100 GB 的可用空间。
点燃版本:2.8.1
java 版本“1.8.0_281” Java(TM) SE 运行时环境(构建 1.8.0_281-b25) Java HotSpot(TM) 64 位服务器 VM(构建 25.281-b25,混合模式)
Windows 版本:2019 64 位,RAM 128 GB,我们尝试安装的可用磁盘空间为 100 GB
异常堆栈跟踪
[2021-02-27 10:42:23,987][ERROR][main][IgniteKernal] Exception during start processors,node will be stopped and close connections
**java.lang.OutOfMemoryError**
at sun.misc.Unsafe.allocateMemory(Native Method)
at org.apache.ignite.internal.util.GridUnsafe.allocateMemory(GridUnsafe.java:1205)
at org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider.nextRegion(UnsafeMemoryProvider.java:103)
at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager$7.nextRegion(GridCacheDatabaseSharedManager.java:1245)
at org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl.start(PageMemoryImpl.java:373)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCacheGroup(GridCacheProcessor.java:2434)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.getorCreateCacheGroupContext(GridCacheProcessor.java:2167)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCacheInRecoveryMode(GridCacheProcessor.java:2282)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.access$1700(GridCacheProcessor.java:202)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor$CacheRecoveryLifecycle.afterBinaryMemoryRestore(GridCacheProcessor.java:5386)
at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.restoreBinaryMemory(GridCacheDatabaseSharedManager.java:1075)
at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.startMemoryRestore(GridCacheDatabaseSharedManager.java:2049)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1254)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2045)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1703)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1117)
at org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:1035)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:921)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:820)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:690)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:659)
at org.apache.ignite.Ignition.start(Ignition.java:346)
at org.apache.ignite.startup.cmdline.CommandLinestartup.main(CommandLinestartup.java:300)
[2021-02-27 10:42:23,989][ERROR][main][IgniteKernal] Got exception while starting (will rollback startup routine).
java.lang.OutOfMemoryError
at sun.misc.Unsafe.allocateMemory(Native Method)
Ignite 正在其他节点上工作。即使在具有相同配置的其他 Windows 2019、2012 机器上。
点燃配置
<!-- Redefining maximum memory size for the cluster node usage. -->
<property name="dataStorageConfiguration">
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<!-- Redefining the default region's settings -->
<property name="defaultDataRegionConfiguration">
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="name" value="Default_Region"/>
<!-- Setting the size of the default region to 48GB. -->
<property name="maxSize" value="#{48L * 1024 * 1024 * 1024}"/>
<!-- Enabling RANDOM_2_LRU eviction for this region. -->
<property name="pageevictionMode" value="RANDOM_2_LRU"/>
<!-- Enabling persistence for this region. -->
<property name="persistenceEnabled" value="true"/>
</bean>
</property>
<!-- set the size of wal segments to 512 MB -->
<!-- the default 64 MB Could not store large single position entry and caused error-->
<property name="walSegmentSize" value="#{512 * 1024 * 1024}"/>
<!-- Keep WALs Separately -->
<property name="walPath" value="D:\am-bmt-ignite-wal\wal"/>
<property name="walarchivePath" value="D:\am-bmt-ignite-wal\archive"/>
</bean>
</property>
是否有任何与 Windows Box 相关的配置可以检查?
我在 Ignite 组中看到了类似的问题: http://apache-ignite-users.70518.x6.nabble.com/After-increasing-maxsize-in-DataRegionConfiguration-Ignite-throws-out-of-memory-exception-td30907.html
如果有人遇到过这种问题,请告诉我。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。