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 the situation; I ask three questions and propose a shape.

  2. 02

    Audit: subscriptions or your own system

    €1,200 / $1,400 net, 5 business days

    The 36-month cost comparison, the order of moves, the risks and a fixed build price. Paid by bank transfer after the call, once you accept the offer; credited in full against a build ordered within 60 days of the report.

  3. 03

    Build, handoff, operate

    fixed price from the audit

    One engineer builds every layer on your account and documents it. The offer includes a monthly plan by default, so the system is looked after from launch day.

Questions I get about this

Tap a question to see the answer.

Scoping calls · most weeks

Audit: subscriptions or your own system. In 5 business days: the 36-month cost comparison, the order of moves, the risks and a fixed build price in writing. It costs €1,200 / $1,400 net, paid by bank transfer against an invoice after the call and after you accept the offer. If you order the build within 60 days of the report, the full amount comes off its first instalment; if not, the report is yours to take to anyone.

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.

The audit gives you a date and a fixed price before you commit to the build. The stack is small and one person builds every layer, so nothing waits in a queue between departments.

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 an offer for the audit

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

More of the same shape