rubenv / sql-migrate

SQL schema migration tool for Go.
MIT License
3.19k stars 273 forks source link

bad connection handling #79

Closed SammyLin closed 7 years ago

SammyLin commented 7 years ago

Hi

I have a big table. I manual execute ALTER TABLE <table> ADDneed speed around 5 mins. When I executealter tablevia sql-migrate then suffer Migration failed: driver: bad connection handling 20170602144919-test.sql its only speed 41 s. I find out the process still running through mysql cli.

this is my mysql timeout settings:

+-----------------------------+----------+
| Variable_name               | Value    |
|-----------------------------+----------|
| connect_timeout             | 10       |
| delayed_insert_timeout      | 300      |
| innodb_flush_log_at_timeout | 1        |
| innodb_lock_wait_timeout    | 50       |
| innodb_rollback_on_timeout  | OFF      |
| interactive_timeout         | 28800    |
| lock_wait_timeout           | 31536000 |
| net_read_timeout            | 30       |
| net_write_timeout           | 60       |
| rpl_stop_slave_timeout      | 31536000 |
| slave_net_timeout           | 3600     |
| wait_timeout                | 28800    |
+-----------------------------+----------+

How can I fix the issue?

SammyLin commented 7 years ago

I fixed problem. In my MacBook, I had suffered this issue, but it didn't suffer in Ubuntu Linux.

DennisDenuto commented 7 years ago

@SammyLin I think we may be experiencing a similar problem. How did you fix your problem?

SammyLin commented 7 years ago

I execute sql-migrate then it had suffered Migration failed: driver: bad connection handling 20170602144919-test.sql in docker in Mac, but not happened in linux. where did you executed sql-migrate?

DennisDenuto commented 7 years ago

We are running in docker for mac too. Was your fix to run it in a non osx machine?