Skip to content

fix: add login timeout to sqlcmd in waitForDatabase#202

Merged
dhensby merged 1 commit intotediousjs:masterfrom
dhensby:fix/sqlcmd-timeout
Apr 14, 2026
Merged

fix: add login timeout to sqlcmd in waitForDatabase#202
dhensby merged 1 commit intotediousjs:masterfrom
dhensby:fix/sqlcmd-timeout

Conversation

@dhensby
Copy link
Copy Markdown
Collaborator

@dhensby dhensby commented Apr 14, 2026

Problem

The waitForDatabase() function calls sqlcmd without a login timeout (-l flag). If the database is hanging or unresponsive, each invocation could block indefinitely, preventing the exponential backoff retry loop from progressing.

Fix

Add -l 5 (5 second login timeout) to the sqlcmd arguments. This ensures connections fail fast so the retry loop can back off and try again promptly.

Without a timeout, each sqlcmd invocation could block indefinitely if
the database is hanging, preventing the retry loop from progressing.
Add -l 5 (5 second login timeout) so connections fail fast and the
exponential backoff can retry promptly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dhensby dhensby merged commit 75f5ea6 into tediousjs:master Apr 14, 2026
16 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 3.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant