From bd03ce9e586ac69ca5da8ea5a29d0b09d8d9f8a7 Mon Sep 17 00:00:00 2001 From: hided62 Date: Mon, 17 Aug 2026 14:48:16 +0000 Subject: [PATCH] =?UTF-8?q?fix(runtime):=20=EB=A6=B4=EB=A6=AC=EC=8A=A4=20?= =?UTF-8?q?=EB=B9=8C=EB=93=9C=20PID=20=EC=97=AC=EC=9C=A0=EB=A5=BC=20?= =?UTF-8?q?=ED=99=95=EB=B3=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 여러 profile PM2 프로세스가 실행 중에도 Gateway 릴리스 빌드가 thread 생성 한도에 걸리지 않도록 운영 runtime 기본 PID 상한을 512로 높이고 문서와 예제를 맞춘다. --- .env.example | 2 +- README.md | 9 +++++---- compose.yaml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.env.example b/.env.example index 26011b5..6430c2a 100644 --- a/.env.example +++ b/.env.example @@ -19,7 +19,7 @@ HTTPS_PORT=443 RUNTIME_MEMORY_LIMIT=4g RUNTIME_MEMORY_SWAP_LIMIT=4g RUNTIME_CPU_LIMIT=4 -RUNTIME_PIDS_LIMIT=256 +RUNTIME_PIDS_LIMIT=512 # Bound Node/Rolldown build parallelism inside the runtime container. RUNTIME_NODE_OPTIONS=--max-old-space-size=1536 # Optional turn-daemon-only heap. Raise the runtime memory hard limit first. diff --git a/README.md b/README.md index 1116b87..c2faeb4 100644 --- a/README.md +++ b/README.md @@ -56,10 +56,11 @@ Core2026 clone, frozen-lockfile install, build와 Gateway migration 때문에 `HTTPS_PORT`는 충돌하지 않는 별도 host port로 지정합니다. 외부 proxy는 원래 `Host` header를 보존해야 합니다. -runtime은 기본적으로 memory/swap 각각 4 GiB, CPU 4개, PID 256개 상한을 -가집니다. 호스트 용량에 맞춰 `RUNTIME_*_LIMIT`을 조정할 수 있지만 0 또는 -무제한으로 두지 않습니다. PM2 process/restart 수가 예상보다 증가하면 로그 수집보다 -runtime 중지가 우선입니다. +runtime은 기본적으로 memory/swap 각각 4 GiB, CPU 4개, PID 512개 상한을 +가집니다. Gateway와 여러 profile의 PM2 process가 실행 중인 상태에서도 release +build의 Node/Rolldown thread를 수용하기 위한 값입니다. 호스트 용량에 맞춰 +`RUNTIME_*_LIMIT`을 조정할 수 있지만 0 또는 무제한으로 두지 않습니다. PM2 +process/restart 수가 예상보다 증가하면 로그 수집보다 runtime 중지가 우선입니다. 초기 빌드와 profile worktree 빌드는 기본 Node heap 1536 MiB, `RAYON_NUM_THREADS=1` 안에서 실행됩니다. `RUNTIME_NODE_OPTIONS`의 heap 상한은 diff --git a/compose.yaml b/compose.yaml index cc80e04..11215ee 100644 --- a/compose.yaml +++ b/compose.yaml @@ -125,7 +125,7 @@ services: mem_limit: ${RUNTIME_MEMORY_LIMIT:-4g} memswap_limit: ${RUNTIME_MEMORY_SWAP_LIMIT:-4g} cpus: ${RUNTIME_CPU_LIMIT:-4} - pids_limit: ${RUNTIME_PIDS_LIMIT:-256} + pids_limit: ${RUNTIME_PIDS_LIMIT:-512} stop_grace_period: 30s restart: unless-stopped