-
Notifications
You must be signed in to change notification settings - Fork 5.7k
feat(inputs.sqlserver): Set pool size and idle connection #17796
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
feat(inputs.sqlserver): Set pool size and idle connection #17796
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your PR @meorkamil! A few comments from my side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @meorkamil for the update! Some more comments...
plugins/inputs/sqlserver/sample.conf
Outdated
| ## Connection pool configuration. | ||
| ## Set the maximum number of open connections to the database. | ||
| ## Default is 0 (unlimited) | ||
| # max_open_connections = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be brief. You don't need to mention the default as this is in the commented option...
| ## Connection pool configuration. | |
| ## Set the maximum number of open connections to the database. | |
| ## Default is 0 (unlimited) | |
| # max_open_connections = 0 | |
| ## Maximum number of open connections to the database, 0 allows the driver to decide | |
| # max_open_connections = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
plugins/inputs/sqlserver/sample.conf
Outdated
| ## Set the maximum number of connections in the idle connection pool. | ||
| ## Default is 2 | ||
| # max_idle_connections = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ## Set the maximum number of connections in the idle connection pool. | |
| ## Default is 2 | |
| # max_idle_connections = 2 | |
| ## Maximum number of idle connections in the connection pool, 0 allows the driver to decide | |
| # max_idle_connections = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to max_open_connections, Noted.
0f5c408 to
c081819
Compare
|
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect. Thanks @meorkamil!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meorkamil Thanks for the contribution!
Summary
[[inputs.sqlserver]]do not support connection pooling. Hence it created multiple connection to the database. This PR is to add the connection pool.Checklist
Related issues
resolves #17781