Containers stuck in "unhealthy" state when starting multiple dependencies with wait-for in Aspire 9.3
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
Hi,
I’m using .NET Aspire 9.3 and created a solution where I run MSSQL, PostgreSQL, Redis, and RabbitMQ as containers inside Aspire.
I also added references from two projects to these containers, using wait-for so that the projects only start after the dependent containers are healthy.
The issue:
Sometimes, when I start the solution in Visual Studio (both with or without debugging), Aspire cannot start all the containers properly. Instead, one or more containers get stuck in the "unhealthy" state, and my projects wait indefinitely.
The strange thing is:
If I stop and restart the solution, or close and reopen, it usually works fine.
The issue occurs more frequently when I have multiple containers running together.
The issue seems related to startup timing/race conditions when multiple containers are being initialized.
It would be great if this could be investigated, since it affects developer workflow when using Aspire with multiple services.
Thanks! 🙏
Contributor guide
Assessment
This issue has not been assessed yet.