Spaces:
Runtime error
Runtime error
tao-shen Claude Opus 4.6 commited on
Commit Β·
fa6d97f
1
Parent(s): 25ff55e
fix: only set NODE_MEMORY_LIMIT when explicitly configured
Browse filesThe default 512MB limit was too restrictive for OpenClaw startup.
Now NODE_MEMORY_LIMIT only applies if the env var is explicitly set.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- scripts/entrypoint.sh +6 -5
scripts/entrypoint.sh
CHANGED
|
@@ -16,13 +16,14 @@ DNS_START=$(date +%s)
|
|
| 16 |
) &
|
| 17 |
DNS_PID=$!
|
| 18 |
|
| 19 |
-
# ββ Node.js memory limit βββββββββββββββββββββββββ
|
| 20 |
-
|
| 21 |
-
export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--max-old-space-size=$NODE_MEMORY_LIMIT"
|
| 22 |
-
echo "[entrypoint] Node.js memory limit: ${NODE_MEMORY_LIMIT}MB"
|
|
|
|
| 23 |
|
| 24 |
# Enable Node.js DNS fix (will use resolved file when ready)
|
| 25 |
-
export NODE_OPTIONS="${NODE_OPTIONS
|
| 26 |
|
| 27 |
# ββ Extensions symlink ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 28 |
SYMLINK_START=$(date +%s)
|
|
|
|
| 16 |
) &
|
| 17 |
DNS_PID=$!
|
| 18 |
|
| 19 |
+
# ββ Node.js memory limit (only if explicitly set) βββββββββββββββββββββββββ
|
| 20 |
+
if [ -n "$NODE_MEMORY_LIMIT" ]; then
|
| 21 |
+
export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--max-old-space-size=$NODE_MEMORY_LIMIT"
|
| 22 |
+
echo "[entrypoint] Node.js memory limit: ${NODE_MEMORY_LIMIT}MB"
|
| 23 |
+
fi
|
| 24 |
|
| 25 |
# Enable Node.js DNS fix (will use resolved file when ready)
|
| 26 |
+
export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--require /home/node/scripts/dns-fix.cjs"
|
| 27 |
|
| 28 |
# ββ Extensions symlink ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 29 |
SYMLINK_START=$(date +%s)
|