Zbigniew Jędrzejewski-Szmek d044ab
From 3dd07ebf08dd630b0f50dfff3ef6d05628b8708b Mon Sep 17 00:00:00 2001
Zbigniew Jędrzejewski-Szmek d044ab
From: Michal Sekletar <msekletar@users.noreply.github.com>
Zbigniew Jędrzejewski-Szmek d044ab
Date: Mon, 17 Jul 2017 10:04:37 +0200
Zbigniew Jędrzejewski-Szmek d044ab
Subject: [PATCH] journald: make sure we retain all stream fds across restarts
Zbigniew Jędrzejewski-Szmek d044ab
 (#6348)
Zbigniew Jędrzejewski-Szmek d044ab
Zbigniew Jędrzejewski-Szmek d044ab
Currently we set 4096 as maximum for number of stream connections that
Zbigniew Jędrzejewski-Szmek d044ab
we accept. However maximum number of file descriptors that systemd is
Zbigniew Jędrzejewski-Szmek d044ab
willing to accept from us is just 1024. This means we can't retain all
Zbigniew Jędrzejewski-Szmek d044ab
stream connections that we accepted. Hence bump the limit of fds in a
Zbigniew Jędrzejewski-Szmek d044ab
unit file so that systemd holds open all stream fds while we are
Zbigniew Jędrzejewski-Szmek d044ab
restarted.
Zbigniew Jędrzejewski-Szmek d044ab
Zbigniew Jędrzejewski-Szmek d044ab
New limit is set to 4224 (4096 + 128).
Zbigniew Jędrzejewski-Szmek d044ab
(cherry picked from commit 3c978aca69e0e43d4dd453437ec9c498ea788795)
Zbigniew Jędrzejewski-Szmek d044ab
---
Zbigniew Jędrzejewski-Szmek d044ab
 units/systemd-journald.service.in | 2 +-
Zbigniew Jędrzejewski-Szmek d044ab
 1 file changed, 1 insertion(+), 1 deletion(-)
Zbigniew Jędrzejewski-Szmek d044ab
Zbigniew Jędrzejewski-Szmek d044ab
diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in
Zbigniew Jędrzejewski-Szmek d044ab
index 66b7c6a48e..1e86d63648 100644
Zbigniew Jędrzejewski-Szmek d044ab
--- a/units/systemd-journald.service.in
Zbigniew Jędrzejewski-Szmek d044ab
+++ b/units/systemd-journald.service.in
Zbigniew Jędrzejewski-Szmek d044ab
@@ -21,7 +21,7 @@ Restart=always
Zbigniew Jędrzejewski-Szmek d044ab
 RestartSec=0
Zbigniew Jędrzejewski-Szmek d044ab
 StandardOutput=null
Zbigniew Jędrzejewski-Szmek d044ab
 WatchdogSec=3min
Zbigniew Jędrzejewski-Szmek d044ab
-FileDescriptorStoreMax=1024
Zbigniew Jędrzejewski-Szmek d044ab
+FileDescriptorStoreMax=4224
Zbigniew Jędrzejewski-Szmek d044ab
 CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_CHOWN CAP_DAC_READ_SEARCH CAP_FOWNER CAP_SETUID CAP_SETGID CAP_MAC_OVERRIDE
Zbigniew Jędrzejewski-Szmek d044ab
 MemoryDenyWriteExecute=yes
Zbigniew Jędrzejewski-Szmek d044ab
 RestrictRealtime=yes