What is the effect of Changing DefaultTimeoutStopSec

anishmonachan

New Member
Joined
Aug 16, 2021
Messages
2
Reaction score
0
Credits
20
Hello,

I've an recurring issue with my linux system. The reboot hangs with a message "
A stop job is running for a xserver startup
".
Sometimes the message appears for different services as well. I'm wondering how would one start investigation on this issue.
I found out that adjusting the default value of
DefaultTimeoutStopSec
in the
/etc/systemd/system.conf file
is a solution.

I'm a bit afraid to adjust this default value. Some questions in mind are,
is that a good solution?
how it would affect OS?
does it lead to the unstability of the OS?

Also, I'm wondering if there a better approach to resolve this issue?
 


DefaultTimeoutStartSec=, DefaultTimeoutStopSec=, DefaultTimeoutAbortSec=, DefaultRestartSec=
Configures the default timeouts for starting, stopping and aborting of units, as well as the default time to sleep between automatic restarts of units, as configured per-unit in TimeoutStartSec=, TimeoutStopSec=, TimeoutAbortSec= and RestartSec= (for services, see systemd.service(5) for details on the per-unit settings). Disabled by default, when service with Type=oneshot is used. For non-service units, DefaultTimeoutStartSec= sets the default TimeoutSec= value. DefaultTimeoutStartSec= and DefaultTimeoutStopSec= default to 90s. DefaultTimeoutAbortSec= is not set by default so that all units fall back to TimeoutStopSec=. DefaultRestartSec= defaults to 100ms.
It's the default time-out for a stop job, the better option would probably be to figure out why xserver is taking so long to stop. Are we talking X11 or and service called xserver?
 
We're talking about the xserver. It's not always the xserver. It can be some other services too. Like openvpn or x11vnc.
1629110476435.png
 
You would start by looking in systemd-journal or syslog to see why those specific services take so long to stop, but change the value of DefaultTimeoutStopSec can't hurt your system because it's just the default time-out for stop jobs and doesn't effect how the rest of the system runs just during shutdown.
 

Members online


Latest posts

Top