mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-21 09:33:57 +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:
parent
7c9dcd50f0
commit
1187340c9d
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user