Coder Social home page Coder Social logo

closing bad idle connection: EOF about mysql HOT 3 CLOSED

cong08 avatar cong08 commented on July 21, 2024
closing bad idle connection: EOF

from mysql.

Comments (3)

cong08 avatar cong08 commented on July 21, 2024

MySQL
image

from mysql.

cong08 avatar cong08 commented on July 21, 2024

I found the following log in the service area: 2024-05-16T11:13:29.336399Z 7367834 [Note] [MY-010914] [Server] Aborted connection 7367834 to db: '' user: '' host: '' (Got timeout reading communication packets). (sql_connect.cc:835) 2024-05-16T11:14:10.286303Z 7367835 [Note] [MY-013417] [Server] The wait_timeout period was exceeded, the idle time since last command was too long. (net_serv.cc:1508) However, the MySQL wait_timeout is set to 28800, and I have set ConnMaxLifetime to 240s. It seems that the server is actively closing the connection. Could it be that ConnMaxLifetime is not taking effect? Should I also set SetConnMaxIdleTime? If SetConnMaxIdleTime is set to a time greater than ConnMaxLifetime, will it close the connection?

from mysql.

methane avatar methane commented on July 21, 2024

That 4 lines of code is not enought to reproduce.
Can you reproduce it with Docker MySQL?
And can you write complete, runnable sample code?

Anyway, only I can say is Go received EOF. It means someone close the connection.
wait_timeout is common, but not only reason to close connections.
Your OS, router, middleware, etc... can close your connection.
And as your server says, someone between Go and MySQL closed your connection.

I can not debug your environment. You should debug your environment with Wireshark and tcpdump.

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