[systemd-devel] sometimes systemd takes a very long time to restart service

Reindl Harald h.reindl at thelounge.net
Tue Jan 1 16:49:49 PST 2013



Am 02.01.2013 01:27, schrieb JB:
> Hello all,
>    I do have one more question about systemd.  Sometimes, it takes a really really long time to get a service to
> stop or restart.  Othertimes, it doesn't.  Now, when it does take a long time I get entires in the logs such as this:
> 
> Jan  1 16:23:42 localhost systemd[1]: webrickd.service stopping timed out (2). Killing.
> Jan  1 16:25:12 localhost systemd[1]: webrickd.service still around after SIGKILL (2). Entering failed mode.
> Jan  1 16:25:12 localhost systemd[1]: Unit webrickd.service entered failed state.

the same happens on F17 with rsyslog if it is configured for mysqld
on a remote host because network.service is stopped before rsyslog
and rsyslog does not handle correctly the siutuation

it took me months to find out what hangs permamently 1.5 minutes
on production machines, my workaround is a systemd-unit which
starts after network.service and TimeoutStopSec=1
________________________________

cat /etc/systemd/system/rsyslog.service
[Unit]
Description=System Logging Service
After=network.service

[Service]
EnvironmentFile=-/etc/sysconfig/rsyslog
ExecStart=/sbin/rsyslogd -n $SYSLOGD_OPTIONS
Sockets=syslog.socket
StandardOutput=null
Restart=always
RestartSec=1
TimeoutStopSec=1

[Install]
WantedBy=multi-user.target
Alias=syslog.service


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130102/0eb44bd9/attachment.pgp>


More information about the systemd-devel mailing list