Skip to content

systemd-journald Troubleshooting: A Full /var, Missing Logs, and Suppressed Messages

/var hits 100% overnight, SSH login stalls, and Nginx returns 502s — the culprit is a few gigabytes under /var/log/journal. The opposite problem is worse: the incident is over, journalctl -b -1 shows nothing, and the evidence is gone. A third case has logs present but the exact errors missing, replaced by a single Suppressed 42831 messages line.

These symptoms come from three journald controls: where logs are written (Storage), how much disk they consume (SystemMaxUse family), and how many messages per second are accepted (rate-limit family). Do not start with rm -rf /var/log/journal/* — while journald holds those files open, that frees no space and destroys the evidence.

This covers the local journal layer only. For aggregation, see Loki log aggregation and retention; for an empty Loki backend, see Loki logs missing, slow, or filling the disk; for disk I/O, see Linux disk I/O monitoring. Fix the clock first with Linux time synchronization in practice, or --since filtering will mislead you.

1. A 60-second decision tree

Symptom: disk full / logs missing / fewer logs than expected
│
├─ df -h /var  above 95% ?
│    ├─ yes → journalctl --disk-usage to see journal's share
│    │          ├─ journal is the bulk ──────────→ Branch A: disk limits
│    │          └─ journal is small ─────────────→ not journald; find another culprit
│    └─ no ↓
│
├─ journalctl -b -1 / --since shows nothing expected ?
│    ├─ yes → check Storage= and whether /var/log/journal exists
│    │          └─ volatile or missing directory ─→ Branch B: storage location
│    └─ no ↓
│
└─ entries exist but key lines are gone, with Suppressed N messages ?
         └─ yes ──────────────────────────────────→ Branch C: rate limiting

The branches can overlap. When disk space runs low, journald multiplies its rate-limit threshold by a factor based on free space: 1 at 1 MB or less, 2 at 16 MB or less, 3 at 256 MB or less, 4 at 4 GB or less, 5 at 64 GB or less, and 6 at 1 TB or less. A nearly full disk therefore tends to cause missing logs as well. Fix the disk first, then revisit the rate limit.

2. Branch A: /var is full of journal files

2.1 Locate the cause before guessing

df -h /var                          # usage and mount point
journalctl --disk-usage             # journal's own usage, active + archived
du -sh /var/log/journal/* 2>/dev/null  # per machine-id directory
find /var/log/journal -type f -name '*.journal*' -printf '%s %p\n' | sort -rn | head

journald and journalctl only consider files ending in .journal or .journal~; other files are excluded from usage calculations. A 3 GB stray .log file in that directory has nothing to do with journald.

2.2 Stop the bleeding: rotate, then vacuum

sudo journalctl --rotate                                  # turn active files into archived ones
sudo journalctl --vacuum-time=7d --vacuum-size=1G          # prune archived files by age and size
sudo journalctl --disk-usage                              # verify

Key trap: --vacuum-size=, --vacuum-time=, and --vacuum-files= only delete archived files, while --disk-usage includes the active one. Usage staying high after vacuuming is expected. Combine all three flags in one command, or run --rotate first to archive the active file.

Likewise, rm-ing journal files leaves df unchanged: journald holds them open, so space is reclaimed only when the descriptor closes. Use --rotate or restart the service.

2.3 The durable fix, in three layers

Layer one: set limits in a drop-in at /etc/systemd/journald.conf.d/10-retention.conf rather than editing the main configuration — drop-ins travel cleanly with configuration management.

[Journal]
SystemMaxUse=2G
SystemKeepFree=10%
MaxRetentionSec=1month
SystemMaxFileSize=128M

SystemMaxUse= is a hard ceiling and SystemKeepFree= reserves room for everything else; journald honors the smaller of the two. The documented defaults are 10% and 15% of the filesystem respectively, each capped at 4G. MaxRetentionSec= defaults to 0 (time-based deletion disabled); set it to 1month to enforce a retention period. SystemMaxFileSize= defaults to one eighth of SystemMaxUse=, capped at 128M, which normally leaves seven rotated files as history.

Layer two: SystemMaxUse= governs only persistent storage (an existing, writable /var/log/journal); volatile storage uses RuntimeMaxUse=. After systemctl restart systemd-journald, watch journalctl --disk-usage for a few days.

Layer three: keep short-term logs locally and ship long-term retention to Loki log aggregation and retention or rsyslog. The local journal answers "what just happened" on a machine you can still access — it is not an archive.

3. Branch B: logs are missing after a reboot

3.1 Know where journald writes first

Storage= has four values with very different behavior:

Value Write location After reboot
volatile /run/log/journal only (in-memory filesystem) Cleared
persistent Prefer /var/log/journal, fall back to /run/log/journal early in boot or if the disk is unwritable Preserved
auto Persistent if the /var/log/journal directory exists, otherwise volatile Depends on the directory
none No local storage at all (forwarding to console or syslog still works) No local logs

The default is persistent. With auto, many cleanup scripts delete /var/log/journal wholesale, silently switching journald back to volatile mode: logs live only in memory and vanish at the next reboot — no configuration changed, yet behavior did.

journald always starts with volatile storage and switches to persistent only after journalctl --flush or SIGUSR1. systemd-journal-flush.service does this at boot; if it fails, logs stay in memory even with Storage=persistent.

3.2 Diagnostic commands

grep -i '^Storage' /etc/systemd/journald.conf /etc/systemd/journald.conf.d/*.conf 2>/dev/null
ls -ld /var/log/journal /run/log/journal 2>&1
systemctl status systemd-journal-flush.service
journalctl -b -1                                  # previous boot
journalctl -b -1 -u nginx.service -p err          # previous boot + unit + errors
journalctl --since '2026-12-03 20:00' --until '2026-12-03 23:00'
journalctl -o short-full -u ssh.service | head    # full date and timezone

Negative boot offsets count back from the end (-0 latest, -1 previous); positive ones count forward from the oldest boot. -p err shows err and more severe levels. -o short-full prints weekday, year, and timezone.

Rule out permissions (a regular user reads their own journal only; use sudo or join systemd-journal) and clock skew, which makes --since point at the wrong window — see Linux time synchronization in practice.

3.3 Restore persistent storage

sudo mkdir -p /var/log/journal
sudo systemd-tmpfiles --create --prefix /var/log/journal
sudo systemctl restart systemd-journald systemd-journal-flush.service
journalctl --flush                        # move in-memory logs to disk
journalctl --disk-usage

Changing Storage= requires a journald restart. If you only recreated the directory, a flush is enough to land the currently buffered logs on disk.

4. Branch C: fewer logs, and Suppressed messages

4.1 Rate limiting is real, and the default is larger than you think

RateLimitIntervalSec= and RateLimitBurst= cap messages per service per window. When a service exceeds the limit, journald drops the rest of that service's messages for the window and reports how many were dropped. Limits are counted per service. The documented default is 10,000 messages in 30 seconds; many tutorials quote 1,000 from older releases.

Setting either value to 0 disables limiting, but an application stuck in a retry loop can fill the disk within minutes. Fix the application's backoff instead.

4.2 Three lines of evidence

journalctl -p err --since '1 hour ago' | grep -i suppressed
journalctl -o verbose -u your-app.service --since '1 hour ago' | head -40
grep -iE 'RateLimit|MaxLevelStore|ForwardToConsole' /etc/systemd/journald.conf /etc/systemd/journald.conf.d/*.conf 2>/dev/null
  • MaxLevelStore= defaults to debug; set to info, debug messages never reach disk.
  • ForwardToConsole=yes is risky on cloud hosts: the manual warns that slow serial consoles can block journald and every service writing to it. Redirect journalctl -f to a file instead.
  • Free disk space tightens the threshold (section 1), so "disk full" and "dropped logs" often share a root cause.

5. Three post-mortems based on typical production scenarios

Scenario 1 (based on a typical production scenario): /var at 100%, SSH and Nginx failing

Symptoms: /var climbed from 60% to 100% in two hours; Nginx timed out and SSH stalled.

Root cause: a Python service left at debug level wrote about 9 MB per minute; the journal reached 9.2 G. SystemMaxUse= was unset, so the 10% default resolved to a size large enough to delay cleanup.

Fix: free 200 MB from a rescue shell (--rotate plus --vacuum-time=1d), add a drop-in with SystemMaxUse=2G and SystemKeepFree=10%, and return the service to info level. Lesson: journal growth accelerates — alert on the journal directory itself.

Scenario 2 (based on a typical production scenario): last night's logs gone after a reboot

Symptoms: a host rebooted at night; by morning, no line from the overnight crash remained, and -b -1 showed only a short boot record.

Root cause: Storage=auto plus a cleanup script that deleted /var/log/journal weekly. With the directory gone, auto silently fell back to volatile storage; logs went to /run/log/journal and were cleared at reboot.

Fix: recreate the directory, set Storage=persistent explicitly, change the script to journalctl --vacuum-time=14d, and verify with journalctl --flush. After the next reboot, logs were intact. Linux disk I/O monitoring ruled out a storage fault.

Scenario 3 (based on a typical production scenario): the critical 500 error was drowned out

Symptoms: during a downstream outage, an application logged about 500 connection refused lines per second. The journal kept the repeats, but the few entries identifying the root cause were gone — only Suppressed 42831 messages remained.

Root cause: the 10,000-per-30-seconds default was exhausted instantly. Free space was just 8 MB, reducing the multiplier to 1. The useful errors landed in the dropped interval.

Fix: raise that service's RateLimitBurst= to 20000 short term; add exponential backoff and a retry ceiling long term, then filter with journalctl -p err. Loki log aggregation and retention gives a second place to look when the local window is overwritten.

6. Cheat sheet

# Disk and usage
df -h /var
journalctl --disk-usage
journalctl --rotate --vacuum-time=7d --vacuum-size=1G

# Storage mode and flush
grep -i '^Storage' /etc/systemd/journald.conf /etc/systemd/journald.conf.d/*.conf 2>/dev/null
ls -ld /var/log/journal /run/log/journal
systemctl status systemd-journal-flush.service
journalctl --flush

# Reading logs
journalctl -b -1 -u nginx.service -p err
journalctl --since '2026-12-04 02:00' --until '2026-12-04 04:00' -o short-full
journalctl -o verbose -u your-app.service | head -40
journalctl -p err --since '1 hour ago' | grep -i suppressed

# Applying configuration
systemctl restart systemd-journald
systemctl cat systemd-journald | head

One-line decisions: - Disk full → --rotate before --vacuum-*; vacuuming never touches the active file, and rm cannot reclaim an open file - Logs missing → check Storage= and the /var/log/journal directory; auto plus a missing directory means volatile and a clean slate on reboot - Fewer logs → look for Suppressed N messages and MaxLevelStore=; the documented default is 10,000 per 30 seconds per service, tightened by free disk space

7. Common misdiagnoses

Symptom Common misread Check first
df at 100% but journal usage is small Blame journald Look for another culprit; --disk-usage counts only .journal* files
Usage unchanged after vacuum Vacuum is broken The active file is not archived; run --rotate first
No space reclaimed after rm Filesystem failure journald still holds the descriptor; restart it
No logs after reboot Disk failure Storage=auto with a missing directory, or a failed flush service
Key entries absent The app never logged them Suppressed N messages; limits are per service
--since returns nothing Logs were lost Verify the system clock first; see Linux time synchronization in practice

8. FAQ

Q1: I ran journalctl --vacuum-size=500M but /var is still full. Why?

Vacuuming deletes archived journal files only, never the active file, and --disk-usage counts both. Run --rotate first to make the active file archived, then vacuum again.

Q2: All logs from yesterday vanished after a reboot. Is the disk broken?

Usually not. With Storage=auto and no /var/log/journal directory, journald uses volatile storage under /run/log/journal, cleared on reboot. Recreate the directory and restart systemd-journal-flush.service.

Q3: Is the default RateLimitBurst 1,000?

No. The journald.conf manual documents 10,000 messages in 30 seconds, counted per service. Older tutorials quote 1,000 from previous releases. Dropped messages are reported as Suppressed N messages.

Q4: Why does df show no change after I delete files in /var/log/journal?

journald keeps those files open. Deleting removes the directory entry, but the space is reclaimed only when the file descriptor closes. Use --rotate or restart systemd-journald.

Q5: What does journalctl -b -1 show?

Logs from the previous boot. A negative boot offset counts back from the end (-0 is the latest, -1 the one before); positive offsets count forward from the oldest boot in the journal.

10. Authoritative references