Case study 07

Troubleshooting & Performance Engineering

Each fix verified
Troubleshooting & Performance Engineering — case study visual

My method

  1. Reproduce: capture the exact traceback.
  2. Measure: query the real data with SQL.
  3. Isolate: decide whether the cause is code, data or configuration.
  4. Fix: make the smallest correct change.
  5. Guard: add a regression test.

Incidents

SymptomEvidence & root causeFixVerified
Field dashboard crashed with an RPC errorIt looked like bad data, but a SQL check returned 0 bad rows. The real cause was a child_of [0] domain when a rep had no custody location.Guarded the domain in codeYes
~500 false late-arrival violations in HRPenalty logic ignored split shiftsShift-aware calculation (new module version)Yes
RPC error after older code was re-deployedA stored filter referenced a field the older code no longer hadRestored the field; retested on a throwaway databaseYes
Database selector crashed on a fresh environmentA stripped add-ons copy in addons_path shadowed core modulesCorrected the add-ons pathYes
Contracts failing to save for dozens of employeesLegacy payslip data from an earlier major versionData/code fixYes
Caps exceeded and commission paid twice under parallel requestsReproduced with a dedicated concurrency test harnessLocking plus regression testsYes
Database restore failed on an embeddings tableThe vector extension was missing in PostgreSQLInstalled the extension and ran CREATE EXTENSIONNeeds confirmation

Lesson I now enforce

In one test run, the database filter also matched production and wrote a few cache rows into it. I documented the incident and adopted a rule: test runs must use an exact, non-production database filter.

Not claimed

I have no evidence of OOM or 502/504 incidents, so none are described. Worker and memory tuning appears in my configuration notes only.

← DevOps & InfrastructureTesting & Quality Assurance →