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

fix: connection leaks #15

Merged
merged 1 commit into from
Feb 7, 2025
Merged

fix: connection leaks #15

merged 1 commit into from
Feb 7, 2025

Conversation

alessio-form3
Copy link

  • run sql.Open only during collector initialisation.
  • make the number of max and max idle connections configurable and give them sensible defaults.
  • add a timeout to each collector scrape.
  • better shut down handling

@alessio-form3 alessio-form3 self-assigned this Feb 7, 2025
return nil, err
}

err = instance.setup()
Copy link
Author

Choose a reason for hiding this comment

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

Calling setup on the instance at the collector instantiation.

@alessio-form3 alessio-form3 force-pushed the ap-fix-connection-leaks branch from 07eed02 to 4cb728c Compare February 7, 2025 11:43
- run sql.Open only during collector initialisation.
- make the number of max and max idle connections configurable and give
  them sensible defaults.
- add a timeout to each collector scrape.
- better shut down handling
- removed probe
@alessio-form3 alessio-form3 force-pushed the ap-fix-connection-leaks branch from 4cb728c to 27ceefc Compare February 7, 2025 14:26
@alessio-form3 alessio-form3 merged commit 345f51f into master Feb 7, 2025
7 checks passed
@alessio-form3 alessio-form3 deleted the ap-fix-connection-leaks branch February 7, 2025 14:52
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