Giter VIP home page Giter VIP logo

Comments (4)

0xTim avatar 0xTim commented on June 12, 2024

I believe this was solved on the forums. Feel free to reopen if there are still unanswered questions!

from mysql-kit.

crontab avatar crontab commented on June 12, 2024

I believe this was solved on the forums. Feel free to reopen if there are still unanswered questions!

Unfortunately it wasn't solved, though some minimal discussion did take place there.

Plus my question was quite specific: does MySQLKit have any keep-alive mechanisms in place that would make the connection pool more reliable? I know I should probably study the MySQLNIO sources and find out myself, I just thought someone already knows.

from mysql-kit.

0xTim avatar 0xTim commented on June 12, 2024

No MySQLKit uses AsyncKit's ConnectionPool which has no concept of a keep alive, so I believe MySQL does nothing for this. cc @gwynne

from mysql-kit.

crontab avatar crontab commented on June 12, 2024

No MySQLKit uses AsyncKit's ConnectionPool which has no concept of a keep alive, so I believe MySQL does nothing for this. cc @gwynne

So this is quite a big question, isn't it? Let's say I leave my app running and there are no client requests for a while, say for many hours. Does this mean the connections that are in the ConnectionPool will all time out (because mysqld closes them after a period of inactivity) and the next client request to my app will fail to run a trivial SQL query because it will be handed a broken connection from the pool?

Strange thing is, nobody seems to be complaining about this on the SwiftNIO forums, which means.... there is in fact some keep-alive mechanism in place, somewhere?

I'd really like to hear someone's informed answer before I dive into experimenting and studying the sources myself.

P.S. so far, I built something based on UNIX sockets (i.e. the MySQL connection is local) which don't seem to timeout. I'm just not sure about TCP sockets.

from mysql-kit.

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.