Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bisheng build时cpu占用太高,可否提供可选项 #245

Open
plainnany opened this issue Jul 13, 2021 · 2 comments
Open

bisheng build时cpu占用太高,可否提供可选项 #245

plainnany opened this issue Jul 13, 2021 · 2 comments

Comments

@plainnany
Copy link

原因,由于在k8s集群中部署,使用bisheng build时,在docker里面编译的时候,由于cpu占用太高,导致doceker会kill掉一些进程,也没有错误日志,直接exit 0了,看了一下能否在下述代码里面提供类型于MAX_WORKERS的选项

// const workersCount = os.cpus().length - 1;
const workersCount = process.env.MAX_WORKERS || os.cpus().length - 1;

https://github.com/benjycui/bisheng/blob/master/packages/bisheng/src/loaders/common/boss.js#L20

@crossskyLi
Copy link

原因,由于在k8s集群中部署,使用bisheng build时,在docker里面编译的时候,由于cpu占用太高,导致doceker会kill掉一些进程,也没有错误日志,直接exit 0了,看了一下能否在下述代码里面提供类型于MAX_WORKERS的选项

// const workersCount = os.cpus().length - 1;
const workersCount = process.env.MAX_WORKERS || os.cpus().length - 1;

https://github.com/benjycui/bisheng/blob/master/packages/bisheng/src/loaders/common/boss.js#L20

我也遇到这个问题了。是否有解决方案
多谢

@plainnany
Copy link
Author

原因,由于在k8s集群中部署,使用bisheng build时,在docker里面编译的时候,由于cpu占用太高,导致doceker会kill掉一些进程,也没有错误日志,直接exit 0了,看了一下能否在下述代码里面提供类型于MAX_WORKERS的选项

// const workersCount = os.cpus().length - 1;
const workersCount = process.env.MAX_WORKERS || os.cpus().length - 1;

https://github.com/benjycui/bisheng/blob/master/packages/bisheng/src/loaders/common/boss.js#L20

我也遇到这个问题了。是否有解决方案 多谢

临时方案copy下来bisheng的源码包使用本地编译了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants