Giter Club home page Giter Club logo

Comments (4)

jchrys avatar jchrys commented on June 15, 2024 2

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

ssharan27 avatar ssharan27 commented on June 15, 2024 2

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.

jchrys avatar jchrys commented on June 15, 2024 1

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

jchrys avatar jchrys commented on June 15, 2024 1

Closed this issue
cc @JohnNiang @ssharan27

from r2dbc-mysql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.