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

Preventing Connection Pool Exhaustion Due to Exceptional Requests & Auto-Reconnecting Druid Post Database Recovery in Spring Boot #5927

Open
303470934 opened this issue May 17, 2024 · 0 comments

Comments

@303470934
Copy link

**dbtype: mysql
**dbversion: 8.0.35
**druid verion: 1.2.22
error sql:
testcase code:
stacktrace info:
**error info: mysql connection error

After my project initializes successfully and begins running, both the project itself and the database operate without issue. Nonetheless, an unexpected disruption arises in which a specific data source connection to the database malfunctions, triggering a cascade of exceptions within the Spring Boot application. Amidst this anomaly, a surge of incoming requests targets this malfunctioning database connection, swiftly depleting the available resources in the connection pool. Consequently, the project grinds to a halt, leaving the Spring Boot application entirely unresponsive.

Question 1: What measures can be implemented to safeguard against excessive consumption of database connection pool resources by erroneous requests, thereby averting the suspension of project operations?
Question 2: In the event that the problematic database recovers without necessitating a restart of the Spring Boot application, what mechanisms can be employed to facilitate Druid's automatic reestablishment of connectivity with the previously troubled database service, ensuring a swift return to normal project functionality?

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

No branches or pull requests

1 participant