Closed bfrk closed 4 years ago
Thomas was right in that the interaction with logrotate is what is failing here. I can definitely see procServ writing to a rotated log file instead of the "current" one. Perhaps our logrotate configuration is wrong. This is how we send the HUP signal to procServ:
postrotate
/bin/systemctl -q -s SIGHUP --kill-who=main kill "softIOC@$(basename $1 .log).service" || true
endscript
It seems that the postrotate script here is at fault, in particular passing --kill-who=main
has no effect. Removing the option makes procServ properly re-open the log file.
Sigh. I have re-read the doumentation of the --kill-who
option again and again, but I still fail to understand why specifying main
is wrong here and all
(the default) works.
We have a machine that runs about 60 instances of procServ. I recently added creation of local log files to our setup. I restarted all instances a week ago and just now noted that a random selection of about 10 of them have missing log files, even though the instances are running. Here is an example:
Grepping the system logs did not reveal anything that sheds further light on the issue. Could it be some sort of race condition when many instances of procServ are started in parallel?