postgresql: increase number of allowed open files

This commit is contained in:
Sandro - 2023-05-17 10:19:45 +02:00
parent d5d532c5d4
commit e482cac4d5
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 9 additions and 1 deletions

View File

@ -221,7 +221,15 @@
# Do not break the boot
enableEmergencyMode = false;
services.nix-daemon.serviceConfig.KillMode = "control-group";
services = {
nix-daemon.serviceConfig.KillMode = "control-group";
postgresql = lib.mkIf config.services.postgresql.enable {
# default is 1024 which was not enough for mastodon and leading to errors like the following which crash postgresql:
# could not close file "./global/176529": Too many open files
serviceConfig.LimitNOFile = toString 1024*32;
};
};
# Reboot on hang
watchdog = lib.mkIf (!config.boot.isContainer) {