-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why does nix-daemon.service
set KillMode=process
#10964
Comments
So |
I don't quite understand your explanation. sudo systemctl stop nix-daemon.service or if the system is currently running out of memory and the user has configured It seems to me that in these circumstances, terminating all current builds is exactly what should happen. I don't think that it makes sense for |
Isn't the stop behavior also used when updating the unit, at least on NixOS?
I haven't encountered any problems that would suggest that this breaks. As far as I can tell, the kernel and/or systemd don't release resources until the last worker is gone. Some small changes we could make to improve matters:
|
Hm, I was under the impression that there was some way to support reloading services without killing them by using Killing all builds due to a restart might indeed be undesirable, I haven't thought of that. I wonder if there is some way to distinguish between these two cases. |
Describe the bug
The
nix-daemon.service.in
file (which is used in NixOS to generate/etc/systemd/system/nix-daemon.service
) setsKillMode=process
.Quoting from the
systemd.kill
man page (emphasis mine):Is there a good reason, why
KillMode=process
is used here? I think that usingcontrol-group
ormixed
seems more appropriate fornix-daemon
.I suspect, that this misconfiguration might be the cause of some issues regarding
nix-daemon
not behaving well under OOM pressure on NixOS. Also, see systemd/systemd#32687.Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: