Closed dveeden closed 2 years ago
/type bug
/severity moderate
[mysql] 2021/07/23 10:26:21 packets.go:36: read tcp 127.0.0.1:54624->127.0.0.1:8022: i/o timeout
This log is from github.com/go-sql-driver/mysql and we can't modify this. I prefer to add document to deal with this problem.
[mysql] 2021/07/23 10:26:21 packets.go:36: read tcp 127.0.0.1:54624->127.0.0.1:8022: i/o timeout
This log is from github.com/go-sql-driver/mysql and we can't modify this. I prefer to add document to deal with this problem.
We can still unhide --read-timeout
and/or change the default.
When the connection is broken we may not get results from the database server for a long time. I think default 15 minutes is reasonable because in a few cases we need to receive data to wait more than 15mins. We hide this parameter to make it less confusing for users. Feel free to reopen this issue if you think it's still a problem.
Bug Report
Running a
dumpling --sql $statement
Versions of the cluster
Dumpling version (run
dumpling -V
):Source database version (execute
SELECT version();
in a MySQL client):To reproduce:
Or without
--read-timeout 50s
and withSELECT SLEEP(1900)
(more than 15m)This is due to hidden read timeout setting that is set to 15m by default.
Note that for long running SQL it might be needed to set
--params 'wait_timeout=3600
depending on what's set on the server side (default 28800 (8h) for MySQL).Some possible fixes/improvements:
--read-timeout
variable and default visible to the user