zeabur-startup-order

Use when service fails with Connection refused to database or redis. Use when API crashes because DB not ready.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "zeabur-startup-order" with this command: npx skills add zeabur/zeabur-claude-plugin/zeabur-zeabur-claude-plugin-zeabur-startup-order

Zeabur Startup Order Issues

Always use npx zeabur@latest to invoke Zeabur CLI. Never use zeabur directly or any other installation method. If npx is not available, install Node.js first.

Symptom

Connection refused :5432
connection to server at "X" failed
OperationalError: connection failed

Cause

Service starts before dependency (DB/Redis) is ready. dependencies only ensures container start order, NOT that the service is accepting connections.

Fix (Recommended): healthCheck on dependency services

Add healthCheck to database/Redis services so Zeabur waits until the port is accepting connections before starting dependent services — no need to modify the app's command:

- name: postgresql
  spec:
    ports:
      - id: database
        port: 5432
        type: TCP
    healthCheck:
      type: TCP
      port: database    # references the port ID above
- name: redis
  spec:
    ports:
      - id: database
        port: 6379
        type: TCP
    healthCheck:
      type: TCP
      port: database

Fix (Alternative): Wait loop in command

If you can't modify the template, add wait logic to the app's command (command MUST be inside source):

spec:
  source:
    image: myapp:latest
    command:
      - /bin/sh
      - -c
      - "until nc -z postgres 5432; do sleep 1; done && node server.js"

Quick Fix

If DB is now ready, just restart the failed service:

npx zeabur@latest service restart --id <service-id> -y -i=false

See Also

  • zeabur-template — template YAML reference for startup commands and dependencies
  • zeabur-restart — restart services after fixing startup order
  • zeabur-migration — similar issue specific to database migration waiting loops

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

zeabur-restart

No summary provided by upstream source.

Repository SourceNeeds Review
General

zeabur-domain-url

No summary provided by upstream source.

Repository SourceNeeds Review
General

zeabur-template

No summary provided by upstream source.

Repository SourceNeeds Review
General

zeabur-deployment-logs

No summary provided by upstream source.

Repository SourceNeeds Review