Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] Add support for SQL Server LoginTimeout to specify seconds to wait before failing connection attempt #33472

Merged
merged 1 commit into from
Jul 8, 2020
Merged

[7.x] Add support for SQL Server LoginTimeout to specify seconds to wait before failing connection attempt #33472

merged 1 commit into from
Jul 8, 2020

Conversation

edwardstumpf
Copy link
Contributor

The existing functionality for the SqlServerConnector class doesn't allow a developer to specify the number of seconds to wait before failing a connection attempt. Without this support, a SQL Server connection attempt can take 30 seconds to fail.

Setting the connection timeout is done by adding the LoginTimeout connection option to the DSN string. Example: "sqlsrv:Server=server;Database=dbname;LoginTimeout=5"

Resources:

…seconds to wait before failing connection attempt.
@mfn
Copy link
Contributor

mfn commented Jul 8, 2020

If accepted should probably also be added to https://github.com/laravel/laravel/blob/195faa16cbeabc84b0eb9c9f4227ead762c93575/config/database.php#L81-L92 so it's "discoverable" at least for new installations

@taylorotwell taylorotwell merged commit 7cf519a into laravel:7.x Jul 8, 2020
@GrahamCampbell GrahamCampbell changed the title Add support for SQL Server LoginTimeout to specify seconds to wait before failing connection attempt. [7.x] Add support for SQL Server LoginTimeout to specify seconds to wait before failing connection attempt Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants