Skip to content

Commit 3d2ab5c

Browse files
committed
docs: note that Node.js 26 keeps the memory of ended workers
On Node.js 26, an ended worker's heap pages stay in the process for the workers started after it, so a build holds them while the main thread bundles the site (~800MB on the Node.js docs). Only Node's `--no-memory-pool-share-memory-on-teardown` gives them back: `v8.setFlagsFromString` has no effect on it, and `NODE_OPTIONS` doesn't accept it. Node.js 24 gives the memory back by itself after a few seconds, and rejects the flag. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 9bfd73f commit 3d2ab5c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎docs/configuration.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ Top-level, alongside `target` and `global`:
144144
`threads: 1`.
145145
- `chunkSize` {number} Items processed per worker thread. **Default:** `10`.
146146

147+
> [!NOTE]
148+
> On Node.js 26, a worker thread that ends leaves its memory for the threads
149+
> started after it to reuse, rather than giving it back. Building the Node.js
150+
> docs, that's ~800MB held while the site is bundled. Passing
151+
> `--no-memory-pool-share-memory-on-teardown` to the `node` running doc-kit
152+
> gives it back. Node.js 24 gives it back by itself after a few seconds, and
153+
> doesn't have the flag.
154+
147155
## Generator options
148156

149157
Each generator documents its own options on its reference page — see the

0 commit comments

Comments
 (0)