首页 > 解决方案 > Apache Ignite:数据区域内存不足 [name=Default_Region,initSize=256.0 MiB,maxSize=68.0 GiB,persistenceEnabled=false]

问题描述

我们在 Apache Ignite 生产环境中的数据区域内存不足,并且 Ignite 进程被杀死。我们已经配置了 68 GB 的堆外内存。并且没有启用驱逐策略,因为我们不想从 Ignite 丢失任何数据。此外,我们没有启用持久性,因为我们只想将整个数据存储在 Ignite 中。

class org.apache.ignite.internal.mem.IgniteOutOfMemoryException: Out of memory in data region [name=Default_Region, initSize=256.0 MiB, maxSize=68.0 GiB, persistenceEnabled=false] Try the following:
  ^-- Increase maximum off-heap memory size (DataRegionConfiguration.maxSize)
  ^-- Enable Ignite persistence (DataRegionConfiguration.persistenceEnabled)
  ^-- Enable eviction or expiration policies
    at org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl.allocatePage(PageMemoryNoStoreImpl.java:304)
    at org.apache.ignite.internal.processors.cache.persistence.freelist.AbstractFreeList.allocateDataPage(AbstractFreeList.java:463)
    at org.apache.ignite.internal.processors.cache.persistence.freelist.AbstractFreeList.insertDataRow(AbstractFreeList.java:501)
    at org.apache.ignite.internal.processors.cache.persistence.RowStore.addRow(RowStore.java:97)

此错误的原因是占用整个数据区域(68 GB)?如果是,我们可以通过停止 Ignite 服务来处理这个问题吗?

标签: bigdataignitein-memory-databasein-memory

解决方案


我认为错误与描述的完全一样,三个解决方案都是有效的。

  1. 给 Ignite 更多内存
  2. 定义驱逐策略,这样记录就会被删除并且不会耗尽内存
  3. 使用 Ignite 持久性,它将任何不适合内存的数据存储在磁盘上

如果您无法分配更多内存并希望将所有内容保留在 Ignite 中,则类似于选项 3。

此外,我们没有启用持久性,因为我们只想将整个数据存储在 Ignite 中。

需要明确的是:Ignite 有两种持久性。第三方持久性,Ignite 将其数据的副本保存到遗留数据库。以及由 Ignite 自行管理的原生持久性。上面的建议主要是关于后者


推荐阅读