egg
egg copied to clipboard
egg-scripts 配置的workers 失效,和真正启动的workers不一致
jenkines打印日志如下,设置了workers=2, 所以真正起来的workers应该为4才对,1个主进程,1个anget进程,2个工作进程,但是从日志看启动了34个,因为机器的是32核的,所以说明workers并未生效
> [email protected] start /data/nginx/code/algorithm-assistant-node-ts
> egg-scripts start --port=7008 --env=prod --workers=2 --daemon --title=egg-server-algorithm-assistant-node-ts --sticky
[egg-scripts] Starting egg application at /data/nginx/code/algorithm-assistant-node-ts
[egg-scripts] Run node --require /data/nginx/code/algorithm-assistant-node-ts/node_modules/source-map-support/register.js /data/nginx/code/algorithm-assistant-node-ts/node_modules/egg-scripts/lib/start-cluster {"port":7008,"workers":2,"title":"egg-server-algorithm-assistant-node-ts","sticky":true,"baseDir":"/data/nginx/code/algorithm-assistant-node-ts","framework":"/data/nginx/code/algorithm-assistant-node-ts/node_modules/egg"} --title=egg-server-algorithm-assistant-node-ts
[egg-scripts] Save log file to /root/logs
[egg-scripts] Wait Start: 1...
[egg-scripts] Wait Start: 2...
[egg-scripts] Wait Start: 3...
[egg-scripts] Wait Start: 4...
[egg-scripts] Wait Start: 5...
[egg-scripts] Wait Start: 6...
[egg-scripts] Wait Start: 7...
[egg-scripts] Wait Start: 8...
[egg-scripts] Wait Start: 9...
[egg-scripts] Wait Start: 10...
[egg-scripts] Wait Start: 11...
[egg-scripts] Wait Start: 12...
[egg-scripts] Wait Start: 13...
[egg-scripts] Wait Start: 14...
[egg-scripts] Wait Start: 15...
[egg-scripts] Wait Start: 16...
[egg-scripts] Wait Start: 17...
[egg-scripts] Wait Start: 18...
[egg-scripts] Wait Start: 19...
[egg-scripts] Wait Start: 20...
[egg-scripts] Wait Start: 21...
[egg-scripts] Wait Start: 22...
[egg-scripts] Wait Start: 23...
[egg-scripts] Wait Start: 24...
[egg-scripts] Wait Start: 25...
[egg-scripts] Wait Start: 26...
[egg-scripts] Wait Start: 27...
[egg-scripts] Wait Start: 28...
[egg-scripts] Wait Start: 29...
[egg-scripts] Wait Start: 30...
[egg-scripts] Wait Start: 31...
[egg-scripts] Wait Start: 32...
[egg-scripts] Wait Start: 33...
[egg-scripts] Wait Start: 34...
[egg-scripts] egg started on http://127.0.0.1:7008
[egg-scripts] Wait Start: 34...
这个是启动时间,不是进程数。你启动的时候有一些耗时操作,导致 egg-scripts 检测了 34 次才发现 egg 启动成功
哦哦,好的,谢谢
请教一下,如何查看启动的时候,具体是哪些操作比较耗时
[egg-scripts] Wait Start: 34...
这个是启动时间,不是进程数。你启动的时候有一些耗时操作,导致 egg-scripts 检测了 34 次才发现 egg 启动成功
看下 run 下的 timing 文件
看下 run 下的 timing 文件 好哒,非常感谢