aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-01 17:44:46 +0200
committerLennart Poettering <lennart@poettering.net>2018-10-16 16:33:55 +0200
commit1abaf4887dde91bd19b36a80475a8eb03f363590 (patch)
treeb079972de26115cb375cda6c017851f9cf6c321a /src/journal-remote
parentcore: add a new call for bumping RLIMIT_NOFILE to "high" values (diff)
downloadsystemd-1abaf4887dde91bd19b36a80475a8eb03f363590.tar.gz
systemd-1abaf4887dde91bd19b36a80475a8eb03f363590.tar.bz2
systemd-1abaf4887dde91bd19b36a80475a8eb03f363590.zip
tree-wide: uniformly bump RLIMIT_NOFILE in all our tools that access the journal
This makes use of rlimit_nofile_bump() in all tools that access the journal. In some cases this replaces older code to achieve this, and others we add it in where it was missing.
Diffstat (limited to 'src/journal-remote')
-rw-r--r--src/journal-remote/journal-remote-main.c4
-rw-r--r--src/journal-remote/journal-upload.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c
index 6d9b44e51..b52e9329e 100644
--- a/src/journal-remote/journal-remote-main.c
+++ b/src/journal-remote/journal-remote-main.c
@@ -12,6 +12,7 @@
#include "journal-remote-write.h"
#include "journal-remote.h"
#include "process-util.h"
+#include "rlimit-util.h"
#include "signal-util.h"
#include "socket-util.h"
#include "stat-util.h"
@@ -1096,6 +1097,9 @@ int main(int argc, char **argv) {
log_show_color(true);
log_parse_environment();
+ /* The journal merging logic potentially needs a lot of fds. */
+ (void) rlimit_nofile_bump(HIGH_RLIMIT_NOFILE);
+
r = parse_config();
if (r < 0)
return EXIT_FAILURE;
diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c
index 621fd620e..88fc51ec2 100644
--- a/src/journal-remote/journal-upload.c
+++ b/src/journal-remote/journal-upload.c
@@ -20,6 +20,7 @@
#include "mkdir.h"
#include "parse-util.h"
#include "process-util.h"
+#include "rlimit-util.h"
#include "sigbus.h"
#include "signal-util.h"
#include "string-util.h"
@@ -780,6 +781,9 @@ int main(int argc, char **argv) {
log_show_color(true);
log_parse_environment();
+ /* The journal merging logic potentially needs a lot of fds. */
+ (void) rlimit_nofile_bump(HIGH_RLIMIT_NOFILE);
+
r = parse_config();
if (r < 0)
goto finish;