H2MHuczyńskiSystems you own
Contact

Work · E-commerce · auto parts · ~100k products

A failing shop, stabilised while it kept selling

The database crashed three times a day and the admin panel was too slow to list parts. Data secured off-site first, the cause measured on live production, small reversible fixes. The shop never closed.

19.5 → 2.8server load
90 s → 1.3 ssearch, worst phrase
−82%server errors a day
0minutes of planned downtime

Measured on the same server before and after. The client is not named.

01

The situation

An auto-parts shop with about 100,000 products on a four-core server. The database went down three times a day, server load sat between 10 and 25, and listing a part in the admin panel took long enough to stop the team.

No backup outside that server. Years of undocumented changes inside the shop engine. The usual advice was a bigger server.

02

Data first

Before any fix: the database, the code and 253,599 product photos copied from the live server straight to off-site storage, with no maintenance mode and no table locks. The shop kept taking orders during the copy.

The backup counted as done only after it was restored into a working clone and its products, orders and customers matched production.

03

Measure, don't guess

The slow-query log was switched on in the live database without a restart. Search was using 93% of the database: one missing index made every search read the whole word list.

Four of my own first hypotheses were wrong, and the report says so. Measuring on production, not on the much faster clone, is what found the real cause.

04

Small, reversible fixes on the live shop

Two indexes, one keyword in the search query, a cap on PHP workers so the operating system stopped killing the database, and a quotation module that no longer failed the page when its licence server said no.

Each change had a backup and a one-line rollback written before it went in. Indexes went in with a short lock timeout, so a failed attempt blocked nothing.

05

The five-hour incident

Mid-engagement every product page returned an error. A setting changed ten months earlier took effect the first time something cleared the cache. The home page, categories and search kept working; the product pages were back in 5 h 19 min with the cause in writing.

06

What was left, honestly

The shop still runs on PHP 7.4, out of security support since 2022. Upgrading it would wipe 822 undocumented lines in the engine, so they were extracted and saved first. That became the start of the next project: a new platform built next to the old shop instead of a risky upgrade.

How the pieces connect

The system on one map. Arrows show what feeds what; hover a piece to light its path.

Shop

Live production · PHP + MariaDB, 4 cores

Kept selling the whole time.

R2

Off-site backup · DB, code, 253,599 photos

Copied without maintenance mode or table locks.

Log

Slow-query log on production

Switched on without a restart; found the 93%.

Clone

Restored working copy

Proves the backup; the rehearsal ground for every fix.

Fix

Reversible changes, each with a rollback

Tried on the clone, measured on production.

Runs on

  • Claude
  • Linux
  • Docker
  • Ansible
  • Cloudflare
  • Git

If you want one of these

Three steps. The six-step version, with the brief and the video request, is on the home page.

  1. 01

    Scoping call

    30 min, free

    You describe what fails and since when; I ask what I need to look read-only, and we agree the start, usually the same or the next business day.

  2. 02

    Recovery triage

    €1,900 / $2,200 net, 3 business days

    A full off-site backup, restored and checked before anything changes; the cause measured on live production; the first fix when it is small and safe; and a written report with every remaining fix priced. It starts the same or the next business day, the report comes within 3 business days, and the fee is credited in full against the fixes or the first 3 months of a plan ordered within 30 days.

  3. 03

    Fix, then a plan

    fixed price from the triage

    The fixes from the report at the price it names, each with a rollback, then Care or Lane keeps the system up. The triage fee is credited against them.

Questions I get about this

Tap a question to see the answer.

Scoping calls · most weeks

€1,900 / $2,200 net, a fixed price. A full off-site backup, restored and checked before anything changes; the cause measured on live production; the first fix when it is small and safe; and a written report with every remaining fix priced. It starts the same or the next business day, the report comes within 3 business days, and the fee is credited in full against the fixes or the first 3 months of a plan ordered within 30 days.

The repository, the Cloudflare account, the domains and the data sit under your company from day one, and the data is yours. Code built only for you becomes yours once it is paid for, as the contract sets out; H2M modules come with a perpetual licence. I get access to your accounts, not ownership of them.

Yes, before you send the brief if you need it. Send yours or use mine.

Something else? Ask it on the call

A 30-minute call, free

Thirty minutes, then a fixed price for the triage

Pick a free time in my calendar. Or leave an email: I reply within one business hour with three questions and a proposed time for the call, not a deck.

More of the same shape