Comments (4)
@ssharan27
After reviewing the issue, it appears that the problem lies with the connection pool rather than the driver. In HikariCP, when acquiring a connection, it attempts to retrieve it repeatedly within the maxAcquireTime, even if the connection is closed. On the other hand, r2dbc-pool seems to attempt a limited number of retries, specified by maxRetry.
To prevent the r2dbc connection pool from retrieving closed connections due to remote mysql server, I found that setting the maxIdleTime to a value lower than the wait_timeout of MySQL resolves the issue. This adjustment ensures that such occurrences no longer happen.
logging.level.org.springframework.r2dbc=DEBUG
spring.r2dbc.url=r2dbc:mysql://localhost:3306/test
spring.r2dbc.username=root
spring.r2dbc.password=password
spring.r2dbc.pool.max-idle-time=10s <-- added
if you believe there is a need to modify the current behavior of the connection pool, I recommend creating an issue on the following GitHub repository: https://github.com/r2dbc/r2dbc-pool. They will be better equipped to assist you with the necessary modifications.
Thanks a lot for your understanding and cooperation. 👍
from r2dbc-mysql.
Thanks @jchrys and @JohnNiang for taking a look, will raise this on r2dbc pool repo. In the mean time will tweak the maxIdleTime value. Cheers 👍
from r2dbc-mysql.
@ssharan27 Thank you for submitting a high-quality issue report for r2dbc-mysql!
Your detailed input is greatly appreciated and will help us investigate and resolve the problem effectively.
We value your contribution to improving the project and will keep you updated on our progress.
Thanks again!
from r2dbc-mysql.
Closed this issue
cc @JohnNiang @ssharan27
from r2dbc-mysql.
Related Issues (20)
- [feature]Support `sessionVariables` configuration properties
- [docs]Write a wiki instead of a huge README HOT 2
- [Feature] Support for Lightweight Ping Syntax
- [feature] Compression protocol support
- [QUESTION] How about removing `socketTimeout`? HOT 1
- [feature] Refactor SQL statement parsing
- [feature] Add support for decoding session state info in Ok packets
- Add support for MariaDB connection redirection
- [feature] Support for Custom Loop Resources
- [feature] Support standard option `lockWaitTimeout` and `statementTimeout` HOT 1
- [feature]Enable Leak detection in CI pipeline HOT 2
- [bug]align with`RowMetaData#getColumnMetadata(String)` specification HOT 3
- [feature] Support for Stored Procedure Execution HOT 1
- [bug] Deploy broken HOT 3
- [bug]Fix Snapshot deployment
- [feature] Extract public API into API package
- Support for MariaDB Extend Type Info
- Error connecting to mysql inside the docker HOT 4
- [feature] Support sql mode `NO_BACKSLASH_ESCAPES`
- [Release]v1.1.3 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r2dbc-mysql.