Linux: OOM when running dsh via npx — use global install instead #3890
imlishiyuan
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Issue: Running the latest
@deepseek-ai/dshvianpxornpm execon Linux triggers a V8 heap OOM during dependency resolution.Environment
Symptom
Process hangs with 100% CPU, then crashes:
Heap peaks at ~2046 MB despite system having 4+ GB free.
Root Cause
npx/npm execperforms on-the-fly dependency tree resolution, which spikes memory usage beyond Node's default heap limit.Fix
Skip
npx. Install globally and run directly:Global installation avoids the heavy in-memory dependency resolution step.
Note: Even
NODE_OPTIONS="--max-old-space-size=8192"did not prevent the OOM when usingnpxon my system.内容(中文版)
问题: 在 Linux 下通过
npx或npm exec运行最新版@deepseek-ai/dsh时,依赖解析阶段触发 V8 堆内存溢出。环境
现象
进程卡死、单核 CPU 占满,随后崩溃:
堆内存涨到约 2046 MB 后崩溃,而此时系统仍有 4GB+ 空闲内存。
原因
npx/npm exec需要现场解析完整依赖树,内存峰值超出 Node 默认堆限制。解决
放弃
npx,改为全局安装后直接运行:全局安装绕过了高内存消耗的依赖解析阶段。
补充: 即使设置了
NODE_OPTIONS="--max-old-space-size=8192",使用npx时仍会 OOM。All reactions