Incident Logs
Real technical nightmares we've been called in to untangle. Anonymized where client confidentiality requires it.
001 — The directory that asked the database the wrong question
Stack: WordPress, Gravity Forms, MariaDB, Meilisearch
Client: US professional association (via agency partner)
Symptom: Public specialist directory with [N] listings. A search with a few filters (specialty, state, name) took [X s]. Under traffic, PHP-FPM workers piled up behind it.
Context: Directory data lives in Gravity Forms entries. The site has 1,000+ forms, and all of them share the same entry-meta table.
Investigation: Gravity Forms stores every field value as a separate row (EAV). Filtering on N fields means N self-joins on a table with [rows] rows. Name search is LIKE '%term%', which no index can serve. Page cache doesn't help: every filter combination is a unique URL.
Why the obvious fixes don't work: Extra indexes don't fix leading-wildcard LIKE or multi-way self-joins. A bigger server only buys time.
Fix: Gravity Forms stays the source of truth, so the editors' workflow doesn't change. Entries sync to Meilisearch on create, update and delete. The browser queries Meilisearch directly with a search-only key: no WordPress bootstrap, no admin-ajax. Where results depend on the viewer's role, the browser gets a signed tenant token.
Outcome: Search: [X s] → [Y ms]. Zero PHP per query. Typo tolerance came free.
Takeaway: A form plugin is a fine place to collect data and a bad search engine.
002 — The upload that broke on the first of every month
Stack: Linux, Docker, PHP-FPM, Nginx (multi-site host)
Client: Several sites on one host
Symptom: Around the start of each month, editors on some sites got The uploaded file could not be moved to wp-content/uploads/YYYY/MM. Someone fixed it by hand; next month it was back.
Context: Each site runs in its own PHP-FPM container as www-data. The host is shared by many sites and several people with root.
Investigation: ls -ld on the new month folder: root:root 755. The application creates that folder on the first upload of the month, unless something else creates it first. Any root process that resolves the upload path creates it as root: a cron'd CLI command, an import, a maintenance script. After that, the container user can't write to it.
Decision: We didn't hunt down the specific job. On a shared host, someone will always run something as root again. Fix the invariant, not the incident.
Fix: A scheduled ownership reset across all sites' upload trees, matching the container's numeric UID rather than the user name (UIDs don't always line up between host and container).
Outcome: The recurring ticket stopped. [confirm]
Takeaway: If a bug comes back on a calendar, look for a scheduler.
003 — The notifications one ISP didn't want
Stack: Postfix, custom PHP mail pipeline, transactional email providers (Emailit, SMTP2GO, Amazon SES), DNS
Client: US professional association, member discussion forum
Symptom: The forum sends 4,000 to 28,000 notification emails a day. Members on one large ISP (comcast.net) [stopped receiving / were deferred]. Every other provider looked fine.
Context: The forum is custom. A separate sender script pulls queued notifications from an API. Members reply by email: a local Postfix receives the reply, and it is posted into the thread.
Investigation: Provider logs showed [deferrals / blocks] concentrated on a single recipient domain. Volume is bursty: one busy thread produces thousands of near-identical messages within minutes from the same sending pool. That is exactly the pattern big ISP filters punish.
Rejected: Batching replies into 10-minute digests would cut volume, but members expect instant delivery. Kept as a later option.
Fix: Route by recipient domain: the default provider for everyone, a separate provider for the problem ISP. The main website got the same routing through a small mu-plugin that picks the transport. Forum traffic later moved to a dedicated subdomain with its own provider, so forum reputation can't drag down transactional mail from the main domain. [confirm status]
Outcome: [delivery numbers before / after]
Takeaway: High-volume notifications and password resets should never share a reputation.