Repository navigation
dbsetup: retry a SQL Server login dropped while the server starts - #37
Open
Shriyansh Singh Sengar (sshriyansh) wants to merge 1 commit into
Open
Shriyansh Singh Sengar (sshriyansh) wants to merge 1 commit into
Shriyansh Singh Sengar (sshriyansh) wants to merge 1 commit into
Conversation
SQL Server can accept a connection while it is still starting and then end
the login without an error of its own. SqlClient reports that as error 0
("A severe error occurred"), which isn't in its transient list, so dbsetup
failed on its first try. Seen once in the compose end-to-end run on main
(9ab8a6d): the health check passed at 18:36:02, SQL Server logged recovery
complete at 18:36:04, and dbsetup's login in between was dropped.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The compose end-to-end job failed once on
mainat 9ab8a6d (run); the rerun passed.What happened: SQL Server's health check (
sqlcmd SELECT 1) passed at 18:36:02, but SQL Server was still upgrading msdb and tempdb and logged Recovery is complete only at 18:36:04. dbsetup connected in between, and SQL Server ended the login without an error of its own. SqlClient reports that as error 0, A severe error occurred on the current command, which isn't in its transient list, so dbsetup failed on the first try instead of waiting.The fix: dbsetup's first-connection retry also retries SqlClient's error 0. Other failures (wrong password, missing permission) still fail at once. The same retry protects a fresh deploy on Azure Local, where the SQL Server container can be starting when the dbsetup Job runs.