bigdata - 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 服务来处理这个问题吗?
解决方案
我认为错误与描述的完全一样,三个解决方案都是有效的。
- 给 Ignite 更多内存
- 定义驱逐策略,这样记录就会被删除并且不会耗尽内存
- 使用 Ignite 持久性,它将任何不适合内存的数据存储在磁盘上
如果您无法分配更多内存并希望将所有内容保留在 Ignite 中,则类似于选项 3。
此外,我们没有启用持久性,因为我们只想将整个数据存储在 Ignite 中。
需要明确的是:Ignite 有两种持久性。第三方持久性,Ignite 将其数据的副本保存到遗留数据库。以及由 Ignite 自行管理的原生持久性。上面的建议主要是关于后者
推荐阅读
- wpf - 重新设置 WinForm 应用程序中托管的 WPF 控件的样式
- ibm-cloud-private - 我可以使用本地 Eclipse 和在 IBM Cloud Private 上运行的小气候吗?
- excel - 将时间戳引用到另一个工作簿
- sql - 如何更新下表?
- gitlab - 如何从 GitLab CI/CD 管道阶段读取 Maven POM?
- mysql - 在写入操作和复制环境中使用 MySQL 优化表请求是否安全?
- python - 使用 Python 和 xml.etree.ElementTree 解析 XML 时遇到一些挑战
- azure - Azure Application Insights 达到每日上限是否会导致我的应用服务返回 503?
- c# - RestSharp.RestClient.ExecuteTaskAsync 永远等待
- c# - 从加载的程序集中找不到方法