Step 5 of 6 · lab · 30 min
Event intake has stalled and restarts are off-limits
Under load the event intake service can no longer save events to its volume and keeps them in memory, and a restart would lose them. Get the space back without a restart and make sure the service log never eats the volume again.
Situation
The lab-ingest service takes events from the shop front-ends — five per second, non-stop. It keeps accepted events
in memory and every two seconds saves them as a batch to its volume /srv/ingest (the spool/ directory), and it
writes every event to the log /srv/ingest/log/ingest.log.
An alert: curl localhost:8090/healthz answers 503, events no longer reach the disk and pile up in memory. The
on-call engineer before you already "cleaned up" the volume, but no space showed up.
Don't restart lab-ingest: the events waiting in memory would be lost on a restart.
Task
- The
/srv/ingestvolume has room again: less than half is used. It is the same volume — don't grow it or swap it. - The service runs as the same process as during the failure.
- Event intake is back: new events are accepted (202), the in-memory queue is written to disk.
- The service writes its log to
/srv/ingest/log/ingest.log, and no deleted but open files remain on the volume. - The log will not eat the volume again: a logrotate rule rotates
ingest.logas soon as it is larger than 10 MiB, keeps three archives at most, and after rotation the service writes to the new file without a restart. logrotate runs every hour on this machine.
Constraints
- Don't restart or stop
lab-ingestandlab-clients, and don't change their programs or units.
Some facts are visible only with
sudo. There is no internet on the machine.
Lab · on your own
No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.
Goals
0 of 5-
The /srv/ingest volume has room again — less than half is used, the volume is the same — not done yet
-
The lab-ingest service was not restarted — the same process as during the failure keeps running — not done yet
-
Event intake is back — the check's events are accepted and the in-memory queue is written to disk — not done yet
-
The service writes its log to /srv/ingest/log/ingest.log, no deleted open files remain on the volume — not done yet
-
A logrotate rule rotates ingest.log by size (10 MiB at most, 3 archives at most), and after rotation the service writes to the new file without a restart — not done yet
The machine is starting
Hints
0 of 3Lab goals
0 of 5-
The /srv/ingest volume has room again — less than half is used, the volume is the same — not done yet
-
The lab-ingest service was not restarted — the same process as during the failure keeps running — not done yet
-
Event intake is back — the check's events are accepted and the in-memory queue is written to disk — not done yet
-
The service writes its log to /srv/ingest/log/ingest.log, no deleted open files remain on the volume — not done yet
-
A logrotate rule rotates ingest.log by size (10 MiB at most, 3 archives at most), and after rotation the service writes to the new file without a restart — not done yet
Goals are checked on the machine after every command.