You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ddev项目提示‘db service stopped’无法启动,报健康检查超时

Fixing Ddev 'db service stopped' & 'health check timed out' Issues

Hey, I’ve run into this exact problem before—super frustrating when your project was working fine yesterday but won’t start today. Let’s walk through some reliable fixes step by step:

  • First, do a full Ddev + Docker reset
    Sometimes stale containers or cached state are the culprit. Run these commands in order:

    # Stop all running Ddev projects and shut down Ddev's backend
    ddev poweroff
    # Delete all Ddev projects (skip snapshots since the DB is already broken)
    ddev delete --omit-snapshot --all
    # Restart your Docker service entirely
    # For Linux:
    sudo systemctl restart docker
    # For Mac/Windows: Open Docker Desktop and click "Restart" from the menu
    
  • Check your project's DB configuration
    Pop open your .ddev/config.yaml file and verify the db_image setting. If you’ve customized it recently, try reverting to the default (e.g., ddev/ddev-dbserver-mariadb-10.4 or the version matching your project). Custom images sometimes have compatibility issues that cause startup failures.

  • Verify Docker has enough resources
    DB services need sufficient memory to start up. If you’re on Mac or Windows, open Docker Desktop’s settings, go to "Resources", and make sure you’ve allocated at least 2GB of memory (4GB is better for larger projects). On Linux, ensure your system has enough free RAM for the DB container to run.

  • Dig into the DB container logs
    The health check timeout usually means the DB failed to start for a specific reason—logs will tell you what that is. Run this command for your project:

    ddev logs -s db
    

    Common issues here include corrupted database files, permission errors, or misconfigured DB settings. If you see corruption errors, you can wipe the DB volume and start fresh:

    ddev stop -a
    ddev delete --omit-snapshot your-project-name
    ddev start
    

    Note: This will erase your local DB data, so only do this if you have a backup or can rebuild the DB from a dump.

  • Fix Docker network conflicts
    Rarely, Ddev’s default network can get into a broken state. Try rebuilding it:

    ddev poweroff
    docker network rm ddev_default
    ddev start
    

Most of the time, the full reset or log inspection will get your DB service back up and running.

内容的提问来源于stack exchange,提问作者rfay

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 07:49:46