> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/zh/hosting/scaling/memory-errors.md).

# 修复自托管 Duaer 的内存问题

自托管 Duaer 的内存相关错误：如何识别与避免。
## 识别与应对

报错正文仍是 JavaScript heap out of memory。数字组织侧如何少带数据见 [流程内存错误](/zh/flow-logic/error-handling/memory-errors.md)。这一页讲进程堆大小，以及队列模式是否把执行分到其他进程。

加大 Node.js 堆能撑过偶然峰值，挡不住每次执行都在变大。不要使用已移除的二进制内存模式，见 [二进制数据](/zh/hosting/scaling/binary-data.md)。每个 worker 有自己的堆，不会互相借用空闲内存。

可用 `NODE_OPTIONS=--max-old-space-size=SIZE` 提高旧生代上限。
## Questions

### Duaer 托管页和流程页的内存错误是两回事吗？

现象相同：堆满。流程页讲少带数据；这一页讲进程堆与 worker。两边都要看。

