From b322ab1b39e29d00674d7e02f3f7475d7802f73e Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 25 Aug 2026 08:20:46 +0900 Subject: [PATCH] fix: increase memory limit to 1Gi and set NODE_OPTIONS heap size n8n 2.23+ has higher memory requirements. The previous 512Mi limit caused OOM crashes (JS heap exhausted at ~248MB). Changes: - memory limit: 512Mi -> 1Gi, request: 256Mi -> 512Mi - NODE_OPTIONS: --max-old-space-size={{ nodeHeapSizeMb }} (default 768MB) keeps JS heap at 75% of limit, leaving headroom for native code/buffers - WEBHOOK_URL -> N8N_WEBHOOK_URL (deprecation warning fix) - values.yaml: expose nodeHeapSizeMb for tuning Co-Authored-By: Claude Sonnet 4.6 --- Chart.yaml | 2 +- README.md | 8 ++++++-- templates/deployment.yaml | 4 +++- values.yaml | 9 +++++++-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index a920237..13b443f 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: n8n description: A Helm chart for n8n workflow automation on Kubernetes (ARM/Raspberry Pi ready) type: application -version: "2.36.5" +version: "2.36.5-a" appVersion: "2.36.5" keywords: - n8n diff --git a/README.md b/README.md index 061aae7..54b6125 100644 --- a/README.md +++ b/README.md @@ -119,12 +119,15 @@ helm install my-n8n cafepieters/n8n \ ### リソース(Raspberry Pi 向けデフォルト) +n8n 2.23 以降はメモリ消費が増加しています。`nodeHeapSizeMb` は `resources.limits.memory` の約 75% に設定してください。 + | パラメータ | デフォルト | |---|---| | `resources.requests.cpu` | `250m` | -| `resources.requests.memory` | `256Mi` | +| `resources.requests.memory` | `512Mi` | | `resources.limits.cpu` | `1000m` | -| `resources.limits.memory` | `512Mi` | +| `resources.limits.memory` | `1Gi` | +| `nodeHeapSizeMb` | `768` | ## セキュアCookieの自動設定 @@ -237,6 +240,7 @@ helm upgrade my-n8n cafepieters/n8n \ | バージョン | n8n | 変更内容 | |---|---|---| +| 2.36.5-a | 2.36.5 | OOM対応: メモリ制限 1Gi・NODE_OPTIONS ヒープ制限追加・WEBHOOK_URL 非推奨警告修正 | | 2.36.5 | 2.36.5 | 自動更新 | | 2.35.3 | 2.35.3 | 自動更新 | | 2.34.4 | 2.34.4 | 自動更新 | diff --git a/templates/deployment.yaml b/templates/deployment.yaml index dad32b3..139f80a 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -41,6 +41,8 @@ spec: containerPort: 5678 protocol: TCP env: + - name: NODE_OPTIONS + value: "--max-old-space-size={{ .Values.nodeHeapSizeMb }}" - name: N8N_PORT value: "5678" - name: N8N_PROTOCOL @@ -48,7 +50,7 @@ spec: - name: N8N_HOST value: {{ .Values.n8n.host | quote }} {{- if .Values.n8n.webhookUrl }} - - name: WEBHOOK_URL + - name: N8N_WEBHOOK_URL value: {{ .Values.n8n.webhookUrl | quote }} {{- end }} - name: GENERIC_TIMEZONE diff --git a/values.yaml b/values.yaml index 642b18a..c20a29a 100644 --- a/values.yaml +++ b/values.yaml @@ -64,13 +64,18 @@ ingress: # - n8n.local # Resource limits suitable for Raspberry Pi +# n8n 2.23+ requires more memory. Set nodeHeapSizeMb to ~75% of memory limit. resources: limits: cpu: 1000m - memory: 512Mi + memory: 1Gi requests: cpu: 250m - memory: 256Mi + memory: 512Mi + +# Node.js heap size limit (MB). Should be ~75% of resources.limits.memory. +# 1Gi limit → 768MB heap leaves headroom for native code and buffers. +nodeHeapSizeMb: 768 autoscaling: enabled: false