Comments (3)
from mysql.
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.
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)
- Bizarre hanging issue in rows.Close() HOT 7
- Can't Install, bug in edwards25519/scalar.go HOT 1
- Likely race that can prevent to recycle closed connections HOT 5
- Return timeout error instead of Invalid connection err when read packet network timeout HOT 5
- 保存时报错:Prepared statement contains too many placeholders
- too may ram usage when lost connection HOT 13
- SEGV writing packet HOT 1
- Connection liveness/goodeness check and AWS Aurora HOT 1
- Data race between mysqlConn watcher and okHandler during context cancellation HOT 3
- v1.6.0 get error
- Data race between mysqlConn.cleanup() and writeHandshakeResponsePacket HOT 2
- MaxOpenConns is not working
- Receiving "(using password: NO)" when password was given HOT 2
- Why must use port 3306?
- Scanner should return one of int64,float64,bool,[]byte,string,time.Time,nil , but I got uint64 HOT 3
- Do I need logic backup mysql data using mysqldump while I have master-slave mysql cluster.
- Improve ErrBadConn
- Can I use this library to parse these byte sequences into the MySQL protocol?
- Function to achieve batch insert with mysql go library since go sql is lacking the functionality HOT 1
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 mysql.