Skip to content

Conversation

@meorkamil
Copy link
Contributor

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

  • No AI generated code was used in this PR

Related issues

resolves #17781

@telegraf-tiger telegraf-tiger bot added area/sqlserver feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Oct 10, 2025
Copy link
Member

@srebhan srebhan left a 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.

@srebhan srebhan self-assigned this Oct 10, 2025
Copy link
Member

@srebhan srebhan left a 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...

Comment on lines 133 to 136
## Connection pool configuration.
## Set the maximum number of open connections to the database.
## Default is 0 (unlimited)
# max_open_connections = 0
Copy link
Member

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...

Suggested change
## 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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

Comment on lines 138 to 140
## Set the maximum number of connections in the idle connection pool.
## Default is 2
# max_idle_connections = 2
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
## 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

Copy link
Contributor Author

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.

@meorkamil meorkamil force-pushed the feat/adding-pool-connection-inputs-sqlserver branch from 0f5c408 to c081819 Compare October 17, 2025 01:11
@telegraf-tiger
Copy link
Contributor

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Perfect. Thanks @meorkamil!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Oct 20, 2025
@srebhan srebhan assigned skartikey and mstrandboge and unassigned srebhan Oct 20, 2025
Copy link
Contributor

@skartikey skartikey left a 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!

@skartikey skartikey merged commit dc40e05 into influxdata:master Oct 20, 2025
26 of 27 checks passed
@github-actions github-actions bot added this to the v1.37.0 milestone Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/sqlserver feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[[inputs.sqlserver]] Add Connection Pool Setting in Telegraf

4 participants