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

Bugfix: Test Connections before Returning them from ConnectionPool. #128

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

vnayar
Copy link
Contributor

@vnayar vnayar commented Dec 1, 2024

From the time the connection was originally created, many problems may have occurred, including a network outage, server restart, timeout, and many other possibilities. In order to prevent these temporary errors from permanently causing connections returned by the ConnectionPool, test the connection before returning it to the user.

In order to prevent inordinate delays, e.g. the first connection to be made after 100 connections had previously been made, only 1 connection will be tested before creating a new one.

Fixes: #124.

From the time the connection was originally created, many problems may have occurred, including
a network outage, server restart, timeout, and many other possibilities. In order to prevent
these temporary errors from permanently causing connections returned by the ConnectionPool,
test the connection before returning it to the user.

In order to prevent inordinate delays, e.g. the first connection to be made after 100 connections
had previously been made, only 1 connection will be tested before creating a new one.

Fixes: buggins#124.
@SingingBush SingingBush merged commit 74a1da9 into buggins:master Dec 3, 2024
42 checks passed
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.

ConnectionPoolDataSourceImpl Returns Dead Connections to Connection Pool
2 participants