运行环境:
系统 | Node版本 | npm版本 | yarn版本 | tyarn版本 |
---|---|---|---|---|
centos7;2核8G | v14.17.5 | 7.21.1 | 1.22.11 | 1.22.11 |
错误原因:
Error: The service was stopped
yarn run v1.22.11
$ cross-env PUB_ENV=test umi build
[info] [webpackbar] Compiling Webpack
[BABEL] Note: The code generator has deoptimised the styling of /home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/@antv/data-set/build/data-set.js as it exceeds the max of 500KB.
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Error: The service was stopped
at /home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/esbuild/lib/main.js:1020:33
at /home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/esbuild/lib/main.js:542:9
at Socket.afterClose (/home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/esbuild/lib/main.js:520:7)
at Socket.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1244:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
build failed
Error: build failed
at /home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/@umijs/bundler-webpack/lib/index.js:151:27
at finalCallback (/home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:108196:12)
at /home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:108217:14
at /home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:67111:7
at done (/home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:67206:13)
at /home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:108128:23
at /home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:108209:15
at finalCallback (/home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:98589:39)
at onCompiled (/home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:98597:20)
at /home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:99008:23
at /home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:97408:14
at eval (eval at create (/home/gitlab-runner/builds/1dae8800/0/pengyinfeng/pub-web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:147581:10), <anonymous>:22:1)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
section_end:1630455216:step_script
�[0Ksection_start:1630455216:cleanup_file_variables
�[0K�[0K�[36;1mCleaning up file based variables�[0;m
�[0;msection_end:1630455216:cleanup_file_variables
�[0K�[31;1mERROR: Job failed: exit status 1
�[0;m
Sep 1 08:44:06 iZwz9ieukla9l11hgncjwzZ kernel: Out of memory: Kill process 10658 (node) score 162 or sacrifice child
Sep 1 08:44:06 iZwz9ieukla9l11hgncjwzZ kernel: Killed process 10787 (esbuild), UID 0, total-vm:919388kB, anon-rss:220740kB, file-rss:360kB, shmem-rss:0kB
Sep 1 08:44:08 iZwz9ieukla9l11hgncjwzZ su: (to root) root on none
Sep 1 08:44:08 iZwz9ieukla9l11hgncjwzZ systemd: Started Session c1659 of user root.
It looks like you're saying the Linux OOM killer may have killed the esbuild binary. Have you tried batching your requests to avoid running out of memory? For example, you could try chunking them 50 at a time or something.
Edit: It would also be good to confirm that the Linux OOM killer is the problem. You should be able to see when this happens in the system-level log.
通过对linux系统日志的查看,发现是系统内存不足导致系统killer打包进程
解决方案:
- 升级内存