DDEV fails to start after update (Failed waiting for web/db containers to become ready)

After updating DDEV from 1.21.x to 1.23.4, I cannot start my local environment anymore. After launching ddev start, I get all the containers starting and I see the following in my console:

Starting Mutagen sync process... 
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................Mutagen sync flush completed in 13m29s.
For details on sync status 'ddev mutagen st d9 -l' 
Waiting for containers to become ready: [web db] 
Failed waiting for web/db containers to become ready: web container failed: log=/var/www/html:OK mailpit:FAILED phpstatus:FAILED, err=ddev-d9-web container is unhealthy, log=/var/www/html:OK mailpit:FAILED phpstatus:FAILED
Troubleshoot this with these commands: 
[
     ddev logs -s web
     docker logs ddev-d9-web
     docker inspect --format "{{ json .State.Health }}" ddev-d9-web | docker run -i --rm ddev/ddev-utilities jq -r
]

However, there is a temporary solution, that works only once. After I run dev config --database=mariadb:10.4 (my current MariaDB version in the config.yml file) the local environment starts as if nothing happened, but after stopping it, the following start will be with an error again.

Anybody got the same problem? Btw, tried on two different locals, which are completely different, same behaviour.

1. Gather More Information:

  • Error Logs: From the provided message, examine the logs using the commands suggested (ddev logs -s web , docker logs ddev-d9-web ). These logs might provide clues about the failure of the web container. Look for errors related to web server startup, PHP processes, or database connections.
  • DDEV Configuration: Share relevant portions of your config.yml file, particularly the web and db sections. This will help identify any configuration issues that might be causing the conflict.
  • Dockerfile (if applicable): If you’re using a custom Dockerfile for your project, share the contents. There might be compatibility issues with DDEV 1.23.4 that need to be addressed.

2. Potential Causes and Solutions:

  • Mutagen Synchronization Issues: The 13-minute Mutagen sync completion time suggests a large amount of data being synchronized. Check for any errors in the logs related to file syncing. If necessary, you can try temporarily disabling Mutagen synchronization using ddev mutagen reset to see if that resolves the startup issue.
  • Database Service Incompatibility: There could be a conflict between your MariaDB version and DDEV’s configuration. Double-check your config.yml file and ensure the database image version aligns with your specific MariaDB requirements.
  • PHP Version Compatibility: Similarly, if a new PHP version was introduced in DDEV 1.23.4, verify that your project’s code is compatible with the updated version.
  • Docker Image Update Check: Consider checking if there are updates available for the Docker image you’re using for your web service. Sometimes, image updates include necessary fixes that might resolve compatibility issues. You can use docker image update to check for updates.

3. Temporary Fix (Use with Caution):

The workaround you mentioned (ddev config --database=mariadb:10.4 ) might be forcing the use of a specific MariaDB version and masking the underlying issue. This solution could lead to unexpected behavior in the future.

4. Troubleshooting Tips:

  • Disable Mutagen: As mentioned earlier, temporarily disabling Mutagen synchronization using ddev config global --performance-mode=none && ddev config --performance-mode=none can help isolate if Mutagen is causing the problem.
  • Restart DDEV Services: Sometimes, restarting the DDEV services can resolve minor glitches: ddev stop && ddev start
  • Rebuild Docker Images: If you suspect issues with the Docker images, try rebuilding them: ddev sh ddev-web bash -c "composer install" (replace ddev-web with your web service container name if different).

5. Additional Support:

  • DDEV GitHub Issues: If you’re still facing difficulties, consider searching for similar issues on the DDEV GitHub repository (Issues · ddev/ddev · GitHub) or creating a new issue there. The DDEV community is very helpful and might have already encountered and resolved the problem.

By systematically working through these steps and providing more details about your specific setup, you should be able to identify the root cause of the issue and get your DDEV environment up and running smoothly again.