`supabase start` waits about 10 seconds for Docker's first health check after services are ready
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 70/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- docker, typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.4k
- Fork
- 540
- Merge trung bình
- 17 giờ 29 phút
- Pull request đã merge (30 ngày)
- 387
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của supabase/cli
-
db schema declarative sync: no way to fail (non-zero exit) when the generated migration is destructiveCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở✨ Feature supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 Bug supabase/cli
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
stack: every Edge Function request starts a new worker, so the same function never reuses one and each call pays a cold startCó thể đã có người làm @7ttp đã nhận 4 ngày trước. Đang mở🐛 Bug supabase/cli
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
supabase/cli#7274 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 Bug supabase/cli
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
supabase/cli#7269 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Explicit local function bundling falls back to API bundling when Docker is unavailableCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở🐛 Bug open-for-contribution supabase/cli
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
supabase/cli#7214 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
components-web-app/docs#311 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NEARBuilders/everything-dev#678 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
formbricks/formbricks#9881 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày