Linux Labs

Inside the system: resources, kernel, processes / Stage 2 of 12

Memory, swap and the OOM killer

Not running Starting usually ~20 s
Leave the lesson

Step 7 of 9 · lab · 25 minmedium

A service restarts in a loop

Since an update, the marketplace feed service restarts every few seconds, and the feed is not refreshed. Find what stops it and fix it so that it runs within the memory it is given.

Situation

The feedd service builds the product feed for the marketplaces: every half second it rebuilds the /var/lib/feedd/feed.xml file, and the marketplaces fetch it. Last night feedd was updated to version 2.4. Since then the marketplaces have been getting a stale feed, and the lab-feedd service is up one moment and restarting the next.

The service unit came with the package: /usr/lib/systemd/system/lab-feedd.service. The application settings are in /etc/feedd/feedd.conf.

Task

  1. The service memory limit is 128 MiB: that is how much it is given on this machine. The limit survives a reboot, and the package unit file stays as it is — do not edit it or replace it with a copy: a package update will overwrite it.
  2. feedd runs without restarting: the check will wait until the service process has run for 30 seconds in a row.
  3. The feed is refreshed every half second as before, and the process memory does not grow from job to job. Do not change the feedd code in /usr/lib/feedd.

The machine has no internet access. Manage the service and edit files in /etc with sudo.

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 3
  • The lab-feedd memory limit is 128 MiB, set by a drop-in for the unit, and survives a reboot — not done yet
  • feedd runs for 30 seconds in a row without restarting — not done yet
  • The feed is refreshed every half second, and the process memory does not grow from job to job; the feedd code is unchanged — not done yet
Ctrl+Enter
Starts the machine node1 · Ubuntu 24.04

The machine is starting

Hints

0 of 3

Lab goals

0 of 3
  • The lab-feedd memory limit is 128 MiB, set by a drop-in for the unit, and survives a reboot — not done yet
  • feedd runs for 30 seconds in a row without restarting — not done yet
  • The feed is refreshed every half second, and the process memory does not grow from job to job; the feedd code is unchanged — not done yet
node1 Ubuntu 24.04

Lab goals

0 of 3
  • The lab-feedd memory limit is 128 MiB, set by a drop-in for the unit, and survives a reboot — not done yet
  • feedd runs for 30 seconds in a row without restarting — not done yet
  • The feed is refreshed every half second, and the process memory does not grow from job to job; the feedd code is unchanged — not done yet
Loading…