I'm blogging about Emacs, Drupal, php and exciting subjects

· Lars Nielsen

Swapping MySQL for Percona Server in Docker: The Config File It Silently Stopped Reading

In July my search engine's MySQL server, running in Docker on the pipeline server, was replaced with Percona Server. The reason was a plan to move the biggest table, the link graph, to the RocksDB storage engine later, and Percona Server ships it as MyRocks; the image includes the ha_rocksdb.so plugin.

Read article Swapping MySQL for Percona Server in Docker: The Config File It Silently Stopped Reading
· Lars Nielsen

Memory Limits on Database Containers: What Has to Fit Under mem_limit for MySQL and OpenSearch

Nearly every service in my search engine's Docker setup had a mem_limit. That's good practice on small shared servers, and it was behind a good part of the summer's mysterious slowness, because a limit only works if you know everything that has to fit under it. Over July and August, the MySQL container and the OpenSearch container each had their limits changed three times.

Read article Memory Limits on Database Containers: What Has to Fit Under mem_limit for MySQL and OpenSearch
· Lars Nielsen

cAdvisor Saw No Containers: Docker's containerd Snapshotter and a Missing mount-id File

The per-container panels in my search engine's Grafana had shown almost nothing. Memory per container, CPU per container: mostly empty, apart from a single series for the whole machine. The comments in the monitoring config blamed a known limitation, that filesystem metrics didn't work with Docker's newer storage backend. That was wrong in an important way.

Read article cAdvisor Saw No Containers: Docker's containerd Snapshotter and a Missing mount-id File
· Lars Nielsen

Caddy Wouldn't Start: Docker Compose Passed an Empty Variable and the Caddyfile Default Never Applied

My search engine's public server put Caddy in front of everything to get Let's Encrypt certificates automatically. While setting it up, I used Let's Encrypt's staging service, to avoid burning the production rate limit on failed attempts, and switched to production by removing the setting from .env. Caddy then refused to start.

Read article Caddy Wouldn't Start: Docker Compose Passed an Empty Variable and the Caddyfile Default Never Applied
· Lars Nielsen

A Backup Script Where a Failed Dump Can't Look Like a Backup: pipefail, Temp Files and Per-Label Retention

CaRMen, my CRM, has a backup script that's 22 lines long. It runs every night from cron and before every deploy, and the deploy script restores from it automatically when a release changes the schema and then fails its health check. A script that a rollback depends on has to be right in the boring details. Three of them are worth spelling out.

Read article A Backup Script Where a Failed Dump Can't Look Like a Backup: pipefail, Temp Files and Per-Label Retention
· Lars Nielsen

Three Empty Grafana Panels, Three Different Causes: MySQL Auth Plugins, a Missing URL Scheme and an Exporter That Doesn't Exist

My search engine's monitoring had a Grafana dashboard with a panel per database: MySQL, PostgreSQL and OpenSearch. At different times over the summer, each of those panels was empty. An empty panel doesn't say why, and in all three cases the answer was different, and usually more than one thing at once.

Read article Three Empty Grafana Panels, Three Different Causes: MySQL Auth Plugins, a Missing URL Scheme and an Exporter That Doesn't Exist
· Lars Nielsen

A Shell wait Loop That Spun for Nine Hours: Exit Status Above 128 Doesn't Mean Interrupted

One morning in August, a worker container in my search engine had been using about 86% of a CPU core for nine hours and producing no output at all. docker top showed only one busy process: the shell script that runs the worker, not the PHP program it starts. The script was stuck in a loop around wait.

Read article A Shell wait Loop That Spun for Nine Hours: Exit Status Above 128 Doesn't Mean Interrupted
· Lars Nielsen

Linux From Scratch to a KDE Plasma Desktop: The Whole Build, in Order

Between August and September I built a Linux From Scratch system on my ThinkPad, scripted end to end, and took it from an empty partition to a KDE Plasma desktop that I now do my work on. Along the way I wrote up the problems one at a time, as separate articles. This is the map: the build in the order it happened, a sentence or two on each problem, and a link to the full story.

Read article Linux From Scratch to a KDE Plasma Desktop: The Whole Build, in Order
Subscribe to Linkhub