increase-memory-limit
increase-memory-limit copied to clipboard
为什么我设置一直不起作用
"scripts": { "start": "egg-scripts start --daemon --title=egg-server-weds-node-edu", "stop": "egg-scripts stop --title=egg-server-weds-node-edu", "dev": "egg-bin dev -r egg-ts-helper/register", "debug": "egg-bin debug -r egg-ts-helper/register", "test-local": "egg-bin test -r egg-ts-helper/register", "test": "npm run lint -- --fix && npm run test-local", "cov": "egg-bin cov -r egg-ts-helper/register", "tsc": "ets && tsc -p tsconfig.json", "ci": "npm run lint && npm run cov && npm run tsc", "autod": "autod", "lint": "tslint --project . -c tslint.json", "clean": "ets clean", "fix-memory-limit": "cross-env increase-memory-limit" }, "dependencies": { "6.0.0": "^1.0.1", "canvas": "^2.4.1", "cross-env": "^5.2.0", "egg": "^2.6.1", "egg-cors": "^2.1.2", "egg-logger": "^2.4.1", "egg-mq": "^0.1.0", "egg-redis": "^2.3.0", "egg-scripts": "^2.6.0", "egg-sequelize": "^4.1.0", "egg-session": "^3.1.0", "egg-socket.io": "^4.1.5", "formstream": "^1.1.0", "increase-memory-limit": "^1.0.7", "install": "^0.12.2", "jsdom": "^14.0.0", "log4js": "^4.4.0", "npm": "^6.5.0", "sequelize": "^5.8.9", "tedious": "^5.0.0" },
执行了一遍 npm run fix-memory-limit命令 然后npm run dev 启动项目做测试,仍然在内存用了1.5G左右就会报FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
请问你后面解决了吗,我也是设置了不起作用呢
建个批处理文件,内容如下: @echo off cmd /c setx NODE_OPTIONS --max_old_space_size=4096 set nodevars = "C:\Program Files\nodejs\nodevars.bat" cmd /c %nodevars%&&npm run dev
启动程序,就可以把你当前运行的程序内存固定设置为4096
------------------ 原始邮件 ------------------ 发件人: "endel/increase-memory-limit" <[email protected]>; 发送时间: 2020年12月18日(星期五) 下午4:23 收件人: "endel/increase-memory-limit"<[email protected]>; 抄送: "&&东子&&"<[email protected]>;"Author"<[email protected]>; 主题: Re: [endel/increase-memory-limit] 为什么我设置一直不起作用 (#26)
请问你后面解决了吗,我也是设置了不起作用呢
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.