On small droplet, i have to import 30mb, 100mb, 1gb, 9gb tens of sql files.
mysql -u user -p db < file.sql
Even in small file i got error “max_allowed_packet”. After updating max_allowed_packet to bigger, this time i got “lost connection to mysql server during query” error. And decided to resize a bigger (4gb ram) droplet. In new droplet i could import small to 1gb files. After a break, now again i get same error.
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
It sounds like that the server is running out of RAM.
You could try adding a swap file as described here so that you could have some additional buffer:
https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04
Also, you could try tweaking your MySQL configuration for better performance and reliability as described here:
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.