1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

journal: print a useful error message if we hit the journal file open limit

See: #20921
(cherry picked from commit 763c46defa)
This commit is contained in:
Lennart Poettering 2023-02-07 15:03:45 +01:00 committed by Luca Boccassi
parent 7c9dcd50f0
commit 1187340c9d
3 changed files with 6 additions and 2 deletions

View File

@ -14,6 +14,8 @@
#include "list.h"
#include "set.h"
#define JOURNAL_FILES_MAX 7168u
typedef struct Match Match;
typedef struct Location Location;
typedef struct Directory Directory;

View File

@ -42,8 +42,6 @@
#include "strv.h"
#include "syslog-util.h"
#define JOURNAL_FILES_MAX 7168
#define JOURNAL_FILES_RECHECK_USEC (2 * USEC_PER_SEC)
/* The maximum size of variable values we'll expand in catalog entries. We bind this to PATH_MAX for now, as

View File

@ -128,6 +128,10 @@ int journal_access_check_and_warn(sd_journal *j, bool quiet, bool want_other_use
log_warning_errno(err, "Journal file %s corrupted, ignoring file.", path);
break;
case ETOOMANYREFS:
log_warning_errno(err, "Too many journal files (limit is at %u) in scope, ignoring file '%s'.", JOURNAL_FILES_MAX, path);
break;
default:
log_warning_errno(err, "An error was encountered while opening journal file or directory %s, ignoring file: %m", path);
break;