Search engine

· Lars Nielsen

Ansible Vault Problems That Weren't Leaks: A Placeholder That Broke Every Deploy and a Password in the Wrong File

My search engine's servers were configured with Ansible, and their secrets lived in Ansible Vault files: database passwords, the admin password, API keys, encrypted in the repository and decrypted at deploy time. In mid-August, I cleaned up two problems in those files. Neither was a leak, but each was the kind of thing that makes the next leak, or the next outage, more likely.

Read article Ansible Vault Problems That Weren't Leaks: A Placeholder That Broke Every Deploy and a Password in the Wrong File
· 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

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

Postgres Table Bloat From Updating Every Row: fillfactor, HOT Updates and the Index That Rules Them Out

In September, my search engine had a job that kept getting slower. Once per PageRank cycle, it wrote the new authority score into every row of the url table, about 150 million rows. Right after a database upgrade, that step took 64.5 minutes. Two weeks later, one run was still going after 13.5 hours.

Read article Postgres Table Bloat From Updating Every Row: fillfactor, HOT Updates and the Index That Rules Them Out
· Lars Nielsen

Slow Queries After a PostgreSQL Upgrade: pg_upgrade and the Planner Statistics It Leaves Behind

"Queries got slow after upgrading PostgreSQL" is a common complaint, and one of the usual causes is a step that's easy to skip because the upgrade itself already reported success. When I upgraded my search engine's database from PostgreSQL 15 to 16, the upgrade notes record that step done before any traffic was allowed back: rebuild the planner's statistics.

Read article Slow Queries After a PostgreSQL Upgrade: pg_upgrade and the Planner Statistics It Leaves Behind
· Lars Nielsen

Why I Didn't Use Symfony Messenger for a Shared Crawl Queue

In July my search engine needed a queue that several servers could share: crawlers on one machine putting fetched pages in, indexers on others taking them out. The project already depended on Symfony Messenger, and a Messenger transport DSN pointing at the database was even configured on one of the servers. Reusing it looked like the obvious move.

Read article Why I Didn't Use Symfony Messenger for a Shared Crawl Queue
Subscribe to Search engine