We have a physical machine with Ubuntu 14.04 LTS where ran an application called Ubersmith that uses Docker container: https://docs.ubersmith.com/display/UbersmithDocumentation/Ubersmith+and+Docker
One of its container has a MySQL Server, and since we wanted to backup the database generating a .sql file to restore on another host if needed, I've installed mysqlclient directly on the OS and I'm using crontab to ran mysqldump twice a day.
That is how I do now:
0 1 * * * /usr/bin/mysqldump -h [login to view URL] -u root --password='******' ubersmith > /backup_mysql_cron/[login to view URL]
0 18 * * * /usr/bin/mysqldump -h [login to view URL] -u root --password='*****' ubersmith > /backup_mysql_cron/[login to view URL]
-
It has worked fine for us until last week, but now, when this cron runs, mysqld start using a big amount of RAM, for example, the server had 16 GB of memory free, and after the dump, it has only 8 GB and this isn't decreasing after the dump process is finished.
Because of this cron, the server starts using swap and its applications become too slow and this affects our customers a lot, then we need someone who has a experience with Ubuntu+Docker+MySQL to find a solution to keep running the dump no affecting the server's applications.
Hi,
Before accepting, please read: you can actually change your commands for the sql-dump a bit (you can try it manually:
mysqldump -h [login to view URL] -u root --password='******' --quick ubersmith > /backup_mysql_cron/[login to view URL]
This will read the large tables row by row instead of keeping everything in the buffer (might increase the dump-size, though)
Best, C
$30 USD trong 1 ngày
5,0 (35 nhận xét)
4,7
4,7
5 freelancer chào giá trung bình $140 USD cho công việc này
I have 16 years of experience in web hosting, server administration and php programming
See my previous works at
https://www.freelancer.com/u/NetFreeHost
Message me, let's discuss the project.
Hi There
have you tried adding the following options to tne mysqldump --skip-opt --quick cron line? I would advise you to give it a try. There are reported mysqldump bugs with the behaviour that you are explaining.
I can help you to troubleshoot further
Regards!