I'm messing around with some timeout settings, and am trying to figure out the correct way to set things for systemd/system daemons. Specifically, this is an underpowered server, and I keep timing out on starting clamd, so I'm trying to figure out how high I need to set the TimeoutStartSec parameter. I tried
systemctl edit --full clamd@.service
and edited it to say
TimeoutStartSec=20min
then did systemctl daemon-reload
But it kept mysteriously timing out after 7 minutes. Eventually, I found that /usr/lib/systemd/system/clamd@.service
had TimeoutStartSec=420
.
Probably against all Right Way to do things, I edited the /usr/lib
version of the file, and commented out that line. Sure enough, that changed things, but it still doesn't seem to be reading the /etc/systemd
version. Once I commented it out, it start timing out after 90 seconds, which I guess must be the default.
As a temporary workaround, I've edited the /usr/lib
version to be my desired 20 minutes, but ... this doesn't seem like the right way to do things.
Is systemctl edit
supposed to be editing the version in /etc/systemd/system
?
Is this the putatively correct way to do things?
Do I have to do something more than systemctl daemon-reload
?
Open to any and all suggestions on The Right Way to do this.
TIA