[systemd-devel] My experience with MySQL and systemctl
Samuel Williams
space.ship.traveller at gmail.com
Wed Apr 19 03:25:06 UTC 2017
I am using MariaDB - and the .service file launches mysqld directly -
it doesn't use mysqld_safe
Here is the basic config, from Arch linux package:
-- mariadb.service
ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER
$_WSREP_START_POSITION
ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION"
KillMode=process
KillSignal=SIGTERM
SendSIGKILL=no
Restart=on-abort
RestartSec=5s
I checked correctly and the log output did appear stopped. Even though
the process was still running. The log output of mysqld during
recovery is only single progress counter without any newline
character.. perhaps this was part of the problem?
I'm happy to have started a useful discussion, and I'm happy to
provide any feedback. I think, ideally, the service should be marked
as "starting up" but not "running" until recovery is complete. That's
because it won't accept connections until the table is fixed. However,
while in this starting up state, during table recovery, if something
bad happens, service may crash.
I think ideally, if the service is taking a long time to start up, the
log output should be written directly to the person who invoked
systemctl, so they can see what is going on.
More information about the systemd-devel
mailing list