Add Variable for Sleep time post SQL dump
GJSchaller opened this issue · 4 comments
One of my sizes has a sizeable DB, and began running into an issue where the mySQL DB would not be finished dumping before the script attempted to compress it. This was resolved by adding a "sleep 10" line in the script, to give it time to finish.
If this pertains to larger databases, and more time might be needed, I would suggest adding a Sleep variable that can be set in the config, so that larger sites can have a higher pause before moving on to the compression. (Optionally, if the size of the DB can be easily determined, have the script estimate a sleep time based off the size of the DB.)
@GJSchaller, thanks for reporting this. To clarify, the mysqldump
command exits before the dump is completed (but the dump finishes in the background)? About how big is this database? I use this on some databases about 15GB in size without issue, so I wonder if you have any filesystem-level influences that might be contributing to this.
I'm not opposed to adding in a sleep, but as you state, hitting the sweet spot won't be easy.
If you could give me:
- mysqldump options
- filesystem type
- filesystem options
- database size
that would be helpful.
I'm hosting with SiteGround, so it may be tricky to get some of these, but let me see what I can find out.
DB is 182.92 MB in size - the rest, I can't tell from my cPanel account. I am on a VPS, with a good amount of memory, but am not sure if that will impact things.
Even if it's just a variable for "sleep=0" by default, it's easier to change in the config than editing the script itself. ;-)
Don't worry about this... it turned out there was a very odd, and specific, issue with my hosting environment. This can be safely closed / ignored.
Thanks, @GJSchaller! I've tried to reproduce this many times in various environments and haven't been successful. Thanks for letting me know that it was an isolated issue.