-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why there is a busy buffer after unexpected EOF #673
Comments
Because UnexpectedEOF error is happen while reading, buffer is used for reading. In error handler, driver tries to send COM_QUIT command to close connection. So, 2nd error message is harmless in this case. Just ignore it. |
@methane What can we do to fix this problem? |
What is "this problem"? You can "Unexpected EOF" by properly configure your environment. To solve unexpected EOF, I always recommend to use If it doesn't fix unexpected EOF, something wrong in your environment or your SQL. If you need longer lifetime by some special reason, (for example, RTT for MySQL |
Is that a general purpose solution? To clarify, would a roughly 10 second connection max lifetime good for bulk application workflows with long intervals between queries? Is this configuration good for most deployment environments, including Kubernetes and local Docker? What is the default connection max lifetime? Can we modify this driver to select a default value more appropriate for our users, so that our users don't have to tweak this value? In the event that a connection does die due to the max connection lifetime expiring, can go-sql-driver/mysql please do a better job identifying this state, instead of burping up connection errors past database/sql, which typically asserts that retries and reconnects are performed automatically by the driver? |
Yes. Creating new connection to DB is cheap enough. Reconnecting hundreds per seconds will kill performance. But one reconnection every 10 seconds is not bad. If you really dislike 10sec, or you're using massive connections, you can increase this timeout to 1min or 3min. I saw some people get trouble on 5min, on Docker environment. So I can't recommend more than 4min.
It is infinite by default. And there are no way to change this default value from driver at the moment.
What you mean "max connection lifetime expiring" here? If you didn't configured SetMaxConnLifetime, there are no " lifetime expiring". TCP connections just killed by various reasons. |
Issue description
I use a one SELECT sql to pull 30GB data(40M number of rows) from one table and use those to do some data processes.But other part of the system is busy, so this select is blocked at 7.55GB data position for long time, then the mysql server kill this sql network connection.
why there is a busy buffer after unexpected EOF?
What can i do to fix this problem? Just fix the blocked part and run data processes again?
Error log
Configuration
Driver version (or git SHA):
Version 1.3 (2016-12-01)
Go version: run
go version
in your consolego version go1.8.1 linux/amd64
Server version: E.g. MySQL 5.6, MariaDB 10.0.20
gce mysql 5.7
Server OS: E.g. Debian 8.1 (Jessie), Windows 10
mysql client os : ubuntu 1404
mysql server os: unknow (gce mysql 5.7)
The text was updated successfully, but these errors were encountered: