Skip to content

Commit

Permalink
docs: add note about --workers option on deployment.md (#5272)
Browse files Browse the repository at this point in the history
  • Loading branch information
kongfu-cat authored Nov 13, 2023
1 parent ad6c06a commit 8f54fe9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions site/docs/core/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ Options:

More about [egg-scripts] and [egg-cluster] documents.

> Note: `--workers`, default to `process.env.EGG_WORKERS`, if unset, egg will use `os.cpus().length`. However, in the docker, the `os.cpus().length` may not be equal to the number of allocated cores, and the obtained value may be large, leading to startup failure. Then try to manually set `--workers`, see [#1431](https://github.com/eggjs/egg/issues/1431#issuecomment-573989059).
#### Dispatch with Arguments

Arguments of dispatch can be configured in `config.{env}.js`.
Expand Down
2 changes: 2 additions & 0 deletions site/docs/core/deployment.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ $ egg-scripts start --port=7001 --daemon --title=egg-server-showcase

更多参数可查看 [egg-scripts][egg-cluster] 文档。

> 注意:`--workers` 默认使用 `process.env.EGG_WORKERS`,或者 `os.cpus().length` 值进行设置,但在 docker 中 `os.cpus().length` 不一定等于分配的核数,获得的值可能较大,导致启动失败,需要手动设置下 `--workers`,参见 [#1431](https://github.com/eggjs/egg/issues/1431#issuecomment-573989059)
#### 启动配置项

你也可以在 `config.{env}.js` 中配置指定启动配置。
Expand Down

0 comments on commit 8f54fe9

Please sign in to comment.