Timeout before mysql container is launched (docker-compose section of the tutorial)
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- docker, docker-compose, mysql
- 领域
- devops, infrastructure
调研方向
Read the docker-compose section of the tutorial and the linked commit that introduced the 10-second timeout. Compare the wait-port and depends_on healthcheck suggestions, then verify that the app waits for MySQL to become ready without timing out on slower machines.
由索引模型根据 Issue 内容生成。
描述
Since this commit which add a 10s timeout an older issue is back.
The timeout was removed because it was creating a problem with slow/busy machine which wasn't able to have the mysql container ready before the timeout (which was 15s at that time). In my case I have experiencing the same issue, my mysql container take a bit more than 2min to be fully ready.
Suggestions
Put a much longer timeout, using wait-port or the depends_on condition with the healthcheck instruction in the docker-compose.yaml for example:
app:
...
depends_on:
mysql:
condition: service_healthy
mysql:
...
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
start_period: 5s
interval: 5s
timeout: 5s
retries: 40
(This will take a bit more time than the wait-port solution because the app container will wait the mysql container to be fully ready before starting)
PS: Also wondering how this can take 2min for me (with 8Go RAM and an i5-4210H CPU @ 2.90GHz × 4) when for other people it's look like to take less than 10s.
- 主要语言
- JavaScript
- 星标
- 3.1k
- 派生
- 6.3k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
docker/getting-started 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
docker/getting-started#481 · 2 条评论 · 5 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 45/100
docker/getting-started#494 ·
-
Chat未关闭
难度 5/5 一周以上 新手友好度 10/100
docker/getting-started#482 ·
-
难度 1/5 1 小时以内 新手友好度 1/100
docker/getting-started#477 ·
-
ToeySuKhothai未关闭
难度 5/5 一周以上 新手友好度 1/100
docker/getting-started#476 ·
查看 docker/getting-started 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
manuXD270516/descanso#80 ·
维护者通常 2 天内回复
-
feat: Warn while typing a forbidden character in a file name可能已有人在做 @Mittalnew 今天认领。 未关闭app Drive 📁 enhancement OO Docs
难度 2/5 1-3 小时 新手友好度 78/100
linagora/twake-drive#4620 · 1 条评论 ·
维护者通常 1 天内回复
-
国战吕蒙【谋断】问题未关闭
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
channels:edit check:passed
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复