Giter Club home page Giter Club logo

Comments (6)

cldmartinez avatar cldmartinez commented on May 24, 2024

I was able to replicate the issue in a local environment and the problem happens when the client that holds the lock never sends a TCP FIN. In that case the lock stays alive. However, if I do the same directly to mysql server the behavior is the same.
To replicate the issue I ran a couple of containers with a mysqlserver + proxysql + custom docker network. Then, I attached another container to the network and with the mysql client started a transaction, ran select for update and then I dropped the container network interface with ifconfig eth0 down.

from proxysql.

renecannao avatar renecannao commented on May 24, 2024

@cldmartinez , the short answer is:

  • if proxysql is not able to determine that the client dropped the connection (for example, it never sent a FIN) then it assumes the client is still there.

from proxysql.

cldmartinez avatar cldmartinez commented on May 24, 2024

Yes, I thought the only way to manage that would be having a network protocol with a keep alive mechanism but as far as I saw it is not the case. Thanks.

from proxysql.

renecannao avatar renecannao commented on May 24, 2024

ProxySQL can have TCP keepalive configured for client connections.
See mysql-tcp_keepalive_time and mysql-use_tcp_keepalive (false by default before 2.6.0)

from proxysql.

cldmartinez avatar cldmartinez commented on May 24, 2024

I will take a look.

from proxysql.

cldmartinez avatar cldmartinez commented on May 24, 2024

I tried and nothing happened (I am monitoring with tcpdump). Back to the definition "When mysql-use_tcp_keepalive is active, ProxySQL will start sending KeepAlive to the destination after the connection has been idle for tcp_keepalive_time seconds" it seems this mechanism apply for idle connection but in the case of one connection with an active transaction (my case) I wouldn't consider that connection as idle.

from proxysql.

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.