Mysql: Connection lost on import of database

Created on 2 Sep 2014  路  8Comments  路  Source: docker-library/mysql

This keeps happening about 30 minutes into import. There are no interesting messages in the logs. Not sure what is going on here.

ERROR 2013 (HY000): Lost connection to MySQL server during query
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    6
Current database: dev_imobitrax

Most helpful comment

I had this problem with a large import and it turned out the host VM RAM wasn't set high enough. Doubled it from 1 GB to 2 GB and the import succeeded.

All 8 comments

Not sure how to help debug this. Have you tried pushing the same SQL file into a normal host install of MySQL so we can compare? We don't exactly have a 30 minute import SQL file lying around to test, verify, and debug this with. :smile:

I wish I could provide more information. I realize it is not much to go on :frowning: ... Any way you can help me decipher more about what is going on?

I have confirmed the issue happens on both boot2docker and Ubuntu.

I have also confirmed that other MySQL containers work. (in this case tutum/mysql)

I wonder if this is related to the memory usage issues we're seeing in #3.

have the same problem, happens during a big mediawiki import, nothing useful in the logs. will try another container now.

Closing, reopen/post if there is any info that can reproduce or solve the issue.

I had this problem with a large import and it turned out the host VM RAM wasn't set high enough. Doubled it from 1 GB to 2 GB and the import succeeded.

This is a general issue with MySQL (see https://stackoverflow.com/questions/10474922/error-2006-hy000-mysql-server-has-gone-away). To fix this with Docker (or at least lessen the likelyhood of it happening) add ' --max_allowed_packet=1073741824' (or to some other appropriately large number) to your startup command

As @marsh0lion said fin start --max_allowed_packet=1073741824 allowed me to import my 250mb db

Was this page helpful?
0 / 5 - 0 ratings

Related issues

whgibbo picture whgibbo  路  5Comments

seangerhardt-wf picture seangerhardt-wf  路  4Comments

TheNotary picture TheNotary  路  4Comments

chlch picture chlch  路  3Comments

perfeyhe picture perfeyhe  路  4Comments