Loading a large (~8GB compressed) MySQL dump is currently failing during the Phacility export process. The underlying command we run is:
gzip -cd <dump.sql> | mysql ...
This is failing after a few minutes with this error:
ERROR 2006 (HY000) at line 13935: MySQL server has gone away
I initially thought this might be a max-allowed-packet issue, but mysql ... --max-allowed-packet 1G also failed in the same way.
This construction also suffers from the "bash pipes are incompatible with error handling" issue where gzip -cd ... failing does not cause the pipe construction to fail, so it's plausible that something extremely silly like "I copied the file wrong" is actually the root cause and that's just being obscured by the shell/pipe.
I'm going to try these steps to reduce the problem:
- Unzip the dump before running it.
- Look at the unzipped dump and see if line 13935 is bad in some obvious way.
- Run it with source ...; instead of by piping it in, with the hope that MySQL will emit a more helpful error message.