docker-compose 启动的服务自动被退出,大家有遇到过没?

2021-09-07 12:29:18 +08:00
 tonghuashuai

大概是启动了一个 nginx 一个 web 服务( python + flask + gunicorn ),总是莫名停掉,看了眼报错应该是 docker compose 的错误,网上搜了下没有头绪。web 服务启动着,即使没有任何请求,过几个小时就会报这个错误。

log 看起来像是没有启动 docker 时使用 docker-compose 启动服务,但我确定 docker 是启动着的(因为另一个 container 一直是在线的)。怀疑像是 gunicorn [ Worker exiting ] 导致的,但也不确定。

docker-compose.yml 文件: https://gist.github.com/tonghs/69534c0c70f7aa7a009acbccee0ea932#file-docker-compose-dev-yml

dev.sh 文件: https://gist.github.com/tonghs/69534c0c70f7aa7a009acbccee0ea932#file-dev-sh

退出前的 log: https://gist.github.com/tonghs/69534c0c70f7aa7a009acbccee0ea932#file-error-log

https://gist.github.com/tonghs/69534c0c70f7aa7a009acbccee0ea932

1065 次点击
所在节点    Docker
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/800369

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX