Sitemap
Abel Abebayehu

Abel Abebayehu

Postmortem

2 min readMar 27, 2025

# Postmortem

Upon the release of ALX’s System Engineering & DevOps project 0x19,
around 06:00 East Africa Time (EAT) here in Ethiopia, an issue popped up on an isolated
Ubuntu 14.04 container running an Apache web server. Every GET request to the server responded with a
500 Internal Server Error, instead of the expected HTML page for a simple WordPress site.

## Debugging Process

Abel (that’s me) opened up the project later in the day — around 19:20 PST — and got assigned to figure it out.
Challenge accepted.

1. First things first, I checked what was running using ps aux. Two apache2 processes were there — one as root, the other as www-data. So far, so good.

2. Headed over to the sites-available folder in /etc/apache2/. Found that the server was serving content from /var/www/html/.

3. In one terminal, I ran strace on the PID of the Apache root process. In another, I hit the server with curl. I was expecting something useful… but nah, strace didn’t say much.

4. Tried strace again, this time on the PID of the www-data process. This time I lowered my expectations — and boom! A lead. strace showed -1 ENOENT (No such file or directory) when trying to access /var/www/html/wp-includes/class-wp-locale.phpp.

5. I checked the /var/www/html/ directory carefully using Vim and pattern matching. Eventually found the issue in wp-settings.php —
Line 137: require_once( ABSPATH . WPINC . ‘/class-wp-locale.php’ );.
But someone had typed it with an extra p: .phpp.

Get Abel Abebayehu’s stories in your inbox

Join Medium for free to get updates from this writer.

6. I removed that extra p from the file name.

7. Hit the server with curl again. This time? Success. Got a nice, clean 200 OK.

8. I also wrote a Puppet manifest to automatically fix the typo — just in case it happens again.

## Summation

In short: a simple typo caused a full app failure. Gotta love how one letter can break everything.
WordPress couldn’t find class-wp-locale.phpp because it didn’t exist — the actual file name was class-wp-locale.php.

The fix? Just delete the extra p from the filename in wp-settings.php.

## Prevention

This outage was not a web server error, but an application error. To prevent such outages
moving forward, please keep the following in mind.

* Test! Test test test. Test the application before deploying. This error would have arisen
and could have been addressed earlier had the app been tested.

* Status monitoring. Enable some uptime-monitoring service such as
[UptimeRobot](./https://uptimerobot.com/) to alert instantly upon outage of the website.

to automate fixing of any such identitical errors should they occur in the future. The manifest
replaces any `phpp` extensions in the file `/var/www/html/wp-settings.php` with `php`.

--

--