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

Added SQL Server request timeout settings #2493

Merged
merged 1 commit into from May 24, 2024
Merged

Added SQL Server request timeout settings #2493

merged 1 commit into from May 24, 2024

Conversation

Auz
Copy link
Contributor

@Auz Auz commented May 8, 2024

SQL Server connections have a default timeout of 15 seconds. This has to be set when connecting. This PR adds a request timeout field that is user adjustable, and also increases the default time to 120 seconds.

Screenshot 2024-05-08 at 1 22 33 AM

Copy link

github-actions bot commented May 8, 2024

Your preview environment pr-2493-bttf has been deployed.

Preview environment endpoints are available at:

@@ -28,6 +28,7 @@ export default class Mssql extends SqlIntegration {
user: this.params.user,
password: this.params.password,
database: this.params.database,
requestTimeout: (this.params.requestTimeout ?? 0) * 1000,
Copy link
Contributor

@lukesonnet lukesonnet May 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you also need to set connectionTimeout (https://www.npmjs.com/package/mssql#general-same-for-all-drivers) to the same value, or let customers customize both?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this—I have no problem adding, but it seems reasonable for the client to connect to the database within 15 seconds but unreasonable for all queries to complete within 15 seconds. I have no problem adding it if you think it's important.

@Auz Auz merged commit 918b50c into main May 24, 2024
3 checks passed
@Auz Auz deleted the mssql-timeout-setting branch May 24, 2024 07:26
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.

None yet

3 participants