DEV Community

Deva
Deva

Posted on

The Oracle VM Was Serving One File. I Killed It.

The x engine reader was hitting an HTTP endpoint on a remote Oracle VM to get a JSON file. One free tier cloud instance, doing exactly one thing: serving a file to a process running on the same machine.

The fix is two lines in a plist. RunnerFileReader now reads from a local path via X_RUNNER_FILE. The fetch loop moved to com.leviathan.x runner fetch.plist: fires every 300 seconds, X_READ_ENV=runner, logs to /tmp/x runner fetch.log. Delete deploy.sh. Delete serve.py. Delete the systemd units. The HTTP transport is gone.

Why did any of this exist? The honest answer: the reader and the fetcher were on different machines once, for a real reason. That reason evaporated. The setup stayed because infra removal feels riskier than infra addition, and because nothing was visibly broken. "It works" is a powerful sedative.

The deletions were more satisfying than the additions. Removing deploy.sh eliminated an entire operational surface: the SCP dance, the systemd units, the Oracle firewall rules that had to stay open, the dashboard I had to remember to check when something looked off. The HTTP server was maybe 40 lines of code. The overhead of keeping it alive was not.

The launchd approach is strictly better here. Local file, local cron, local logs. When it breaks I open /tmp/x runner fetch.log rather than a browser. The failure mode is also simpler: either the plist is loaded or it is not. No network partition. No VM billing surprise. No Oracle free tier deprecation risk.

What I would do differently: not build the HTTP transport layer at all. The reader and the fetcher were always going to run on the same machine in practice. The abstraction added no real value and a lot of surface area. When a process needs a file, give it the file. Putting a web server in the middle and calling it decoupled architecture is a great way to end up SSHing into a VM at 2am.

One side effect: the migration shook loose stale dev dependencies. The LinkedIn test suite needed responses and pypdf, both dropped during a uv workspace migration in May. Caught because I was already touching the dependency surface. Wide blast refactors are worth doing even when the primary change is small. You find the things that slipped.

Running leaner now. One less machine to babysit.

Top comments (0)