summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-08 03:17:50 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-08 03:20:45 +0100
commitde45d726034f33afdb0a185e62fc61bf10a0acd2 (patch)
tree866746bc12372cebe279c380339a374d69ed225b /units
parent2ac23519d04835e8d8dfbce3d08d9ff76db58a68 (diff)
journal: bump RLIMIT_NOFILE when journal files to 16K (if possible)
When there are a lot of split out journal files, we might run out of fds quicker then we want. Hence: bump RLIMIT_NOFILE to 16K if possible. Do these even for journalctl. On Fedora the soft RLIMIT_NOFILE is at 1K, the hard at 4K by default for normal user processes, this code hence bumps this up for users to 4K. https://bugzilla.redhat.com/show_bug.cgi?id=1179980
Diffstat (limited to 'units')
-rw-r--r--units/systemd-journal-gatewayd.service.in4
-rw-r--r--units/systemd-journal-upload.service.in4
-rw-r--r--units/systemd-journald.service.in4
3 files changed, 11 insertions, 1 deletions
diff --git a/units/systemd-journal-gatewayd.service.in b/units/systemd-journal-gatewayd.service.in
index 5bd8e4b34..987220e55 100644
--- a/units/systemd-journal-gatewayd.service.in
+++ b/units/systemd-journal-gatewayd.service.in
@@ -20,5 +20,9 @@ PrivateNetwork=yes
ProtectSystem=full
ProtectHome=yes
+# If there are many split upjournal files we need a lot of fds to
+# access them all and combine
+LimitNOFILE=16384
+
[Install]
Also=systemd-journal-gatewayd.socket
diff --git a/units/systemd-journal-upload.service.in b/units/systemd-journal-upload.service.in
index 359ff10e2..b2e3c769c 100644
--- a/units/systemd-journal-upload.service.in
+++ b/units/systemd-journal-upload.service.in
@@ -17,5 +17,9 @@ PrivateTmp=yes
PrivateDevices=yes
WatchdogSec=20min
+# If there are many split up journal files we need a lot of fds to
+# access them all and combine
+LimitNOFILE=16384
+
[Install]
WantedBy=multi-user.target
diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in
index e3eea2595..a3540c65d 100644
--- a/units/systemd-journald.service.in
+++ b/units/systemd-journald.service.in
@@ -26,5 +26,7 @@ WatchdogSec=1min
FileDescriptorStoreMax=1024
# Increase the default a bit in order to allow many simultaneous
-# services being run since we keep one fd open per service.
+# services being run since we keep one fd open per service. Also, when
+# flushing journal files to disk, we might need a lot of fds when many
+# journal files are combined.
LimitNOFILE=16384