`supabase start` waits about 10 seconds for Docker's first health check after services are ready

已关闭
#7,427 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@7ttp 已经在做这个了。

开始于 2026年10月31日。

  • #7430 来自 @7ttp —— 已合并

评估

难度
3/5
预计耗时
1-2 天
新手友好度
70/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
docker, typescript
领域
cli, devops

调研方向

Start by reading StartHealthcheckSpec and docker-create-args.ts, the two locations named in the issue, and check how Docker Engine versions are handled. Verify how health-check options are passed for auth, realtime, storage, and kong. Done means supported engines use a 1-second start interval while retaining the 10-second steady-state interval, and older engines omit the flag.

由索引模型根据 Issue 内容生成。

描述

🐛 Bug supabase/cli
Existing issues
  • I have searched the existing issues.
Affected area

Local development

Problem to solve

supabase start finishes about 10 seconds after every service is ready, because it waits for Docker's first health check and Docker runs that one full interval after the container starts.

auth, realtime, storage and kong use --health-interval 10s with no start interval. The CLI polls every second, but the container reports starting until the first check runs.

Timings from supabase start restarting an existing project, on 3.0.0-beta.17, Docker 29.8.1 and WSL2. I ran each container's own health check command inside it every 0.3 s to see when it first passed:

Container Created Health check first passes Docker's first health check
db 0.7 s 0.7 s ~10.8 s
kong 1.3 s 1.8 s ~11.6 s
auth 1.5 s 1.6 s ~11.8 s
realtime 1.7 s 4.1 s ~12.0 s
storage 2.0 s 3.0 s ~12.1 s

The command exited at 13.9 s, with everything passing by 4.1 s. This is one run with studio,imgproxy,vector,logflare,edge-runtime,postgres-meta,supavisor,mailpit,postgrest excluded. A first start with an empty volume showed the same gap (54.1 s and 63.8 s, including image pulls).

--ignore-health-check doesn't skip the wait.

Proposed solution

Pass Docker's --health-start-interval (for example 1s) with --health-start-period on these services, so the first checks run soon after start while the steady-state interval stays at 10 seconds. StartHealthcheckSpec and docker-create-args.ts would each need one new field.

The flag needs Docker Engine 25 or later (API 1.44), so older engines would need it left out. I haven't tested other container runtimes.

Alternatives considered

Lowering intervalSeconds is simpler and works on every engine, but it keeps running the checks at that rate for the life of the stack.

Additional context

Postgres already moved to a connection from the host in #7362, which took about 10 seconds off a restart compared with 2.122.0 (23.5 s in the same test). This is the remaining part of the same wait.

Happy to open the PR if this gets the open-for-contribution label.

This was written by Opus 5.5.

主要语言
TypeScript
星标
2.4k
派生
540
平均合并
17 小时 3 分钟
30 天内合并 PR
390

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

supabase/cli 的其他 Issue

查看 supabase/cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。