Closed packi closed 4 weeks ago
The restart case for systemd looks fine, as the commands are checked, but I'm worried about the _restart_process
case: the command output is not checked for, so a failure to start here will be silenced. I wouldn't matter with the previous code, as we would restart it anyway on the next try.
After discussing with @packi the use without systemd is supposed to be for testing purposes only.
In some rare cases MySQL takes a long time to start accepting queries. When that happens, the server may take several minutes to do some initial processing, after which it starts responding normally again and subsequent restarts are fast. Restarting it before it has finished the processing causes the operation to never complete so avoid doing that so that the system does not go to never ending restart loop.