Linux Labs

Observability: metrics, alerts, logs / Stage 8 of 9 · step 5 of 6

The site returns 500

medium ~25 min
Not running Starting usually ~20 s
Report a problem

Situation

The hotel booking site is http://booking.lab.test/: nginx takes the requests and passes them to the lab-booking application. Guests write that the site answers "500 Internal Server Error". The on-call engineer has already opened the site's error.log — it is empty. The team lead asks for a short report: from what moment the site has been broken and which line in the logs explains it. And the site has to be brought back.

The site logs are /var/log/nginx/booking.access.log and /var/log/nginx/booking.error.log; the application writes to the systemd journal. Both are read with sudo.

Task

  1. Write to ~/incident.txt: - as the first line — the time the outage began, to the second (from then on the site returns 500), in the form the journal or access.log uses: 2026-10-22 04:41:25 or 22/Oct/2026:04:41:25; - below it — the line from the application journal that shows the cause of the 500 answers.
  2. http://booking.lab.test/ answers 200 again, and the page comes from the lab-booking application.
  3. The site answers 200 after the application restarts too: sudo systemctl restart lab-booking.

Constraints

  • Do not change the application code /opt/booking/booking.py — look for the cause in its settings and fix it there.
  • The check itself restarts lab-booking and requests the site with a tag in the address: the answer must come from the application, not from nginx.

Visitors keep coming to the site while you investigate — new lines keep appearing in the logs.

Visible only to you. Saved as you type.

All notes

Lab goals

0 of 4
  • http://booking.lab.test/ answers 200 — the page comes from the lab-booking application, its code is unchanged — not checked yet
  • The first line of ~/incident.txt holds the time the outage began, to the second — from then on the site returns 500 — not checked yet
  • ~/incident.txt contains a line from the application journal that shows the cause of the 500 answers — not checked yet
  • The site answers 200 after the application restarts too: sudo systemctl restart lab-booking — not checked yet

Hints

0 of 3 open · they open one at a time
Hint 1
Show the solution after 3 failed checks

Leave the lab?

The machine keeps running for 10 more minutes, then it is removed. Files are lost; completed goals stay.

Loading…