Umbraco 13.9.2 – BootFailedException on server restart

Hey everyone :waving_hand:

We’re running Umbraco CMS 13.9.2 on IIS, and I’ve hit a snag.

When our server restarts, IIS tends to spin up the site before the SQL database is fully online. That ends up throwing this error on startup:

Umbraco.Core.Exceptions.BootFailedException: Boot failed

It looks like Umbraco is trying to boot before the database is available and doesn’t retry, so the whole thing just fails out.

Has anyone else run into this before?

Never been an issue for us with any versions prior or succeeding V13.

If your server resources are stable and the SQL Service is setup correctly under services, you could look at the below options.

Maybe a couple of ways to tackle this depending on what’s available.

You could write a batch script (although old school) to execute the site to startup (or a scheduled task). For a more modern approach you could look at a PowerShell script similar to

do {
    try {
        $conn = New-Object System.Data.SqlClient.SqlConnection
        $conn.ConnectionString = "Server=yourserver;Database=yourdb;User Id=youruser;Password=yourpass;"
        $conn.Open()
        $conn.Close()
        $sqlReady = $true
    } catch {
        Start-Sleep -Seconds 5
    }
} until ($sqlReady)

Start-WebSite -Name "YourUmbracoSite"

You would need to replace the placeholders with you site/SQL values and may need to set the ExecutionPolicy but again this depends on the environment (add logging to give more insight if the script is failing).