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
This commit is contained in:
parent
8586e8ab84
commit
763c46defa
@ -14,6 +14,8 @@
|
||||
#include "list.h"
|
||||
#include "set.h"
|
||||
|
||||
#define JOURNAL_FILES_MAX 7168u
|
||||
|
||||
#define JOURNAL_LOG_RATELIMIT ((const RateLimit) { .interval = 60 * USEC_PER_SEC, .burst = 3 })
|
||||
|
||||
typedef struct Match Match;
|
||||
|
@ -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