All insights

Insights

How to Investigate a Production Bug When You Did Not Build the System

A practical process for diagnosing production issues in an unfamiliar software system.

A production bug in an unfamiliar system creates pressure to change code quickly. That pressure is understandable, but the fastest path to a durable fix is usually to reduce uncertainty first. A visible error is often the last event in a chain that includes data, configuration, background work, an external service, and a particular user action.

Start with a precise symptom

Write down what is known before interpreting it. Who is affected? Which action fails? When did it first occur? Is the failure consistent, intermittent, or tied to a tenant, browser, payment method, or data record? A useful incident description separates what someone observed from what they believe caused it.

If the issue has a revenue or operations impact, also identify the safe workaround. The workaround may be manual processing, temporarily disabling a route, or pausing a scheduled job. It is not the final fix, but it lowers the risk of experimenting under pressure.

Build an evidence timeline

Use timestamps to connect the report to application logs, deployment history, infrastructure events, and messages from external providers. Normalize time zones before drawing conclusions. An error line is much more useful when it can be placed beside the request that triggered it and the release that preceded it.

In a system you did not build, trace the request boundary first. That might be an HTTP endpoint, a queue message, a webhook delivery, or a scheduled task. From there, follow the data through the narrowest relevant path rather than trying to read the whole repository.

Reproduce without making production worse

Prefer a staging environment or a controlled local setup with representative, non-sensitive data. If reproduction is impossible, create a test case from the observed inputs and logs. A single reliable reproduction turns a vague report into a specific behaviour that can be changed and checked.

Avoid applying a patch only because it makes the visible error disappear. The same code path may be hiding data corruption, a retry storm, or a failed authorization check. Ask what invariant should hold after the fix, such as “an accepted payment creates exactly one order” or “a failed sync remains visible for recovery.”

Check before releasing

Use this checklist before calling the work complete:

  • The affected flow has been reproduced or explained with evidence.
  • The root cause is distinguished from the first visible symptom.
  • The change has a focused test or a documented manual verification path.
  • Logging, alerts, or audit evidence make a recurrence easier to see.
  • Deployment and rollback steps are understood by the person releasing the change.
  • Remaining uncertainty is documented rather than silently assumed away.

A production issue does not require a dramatic rewrite. It requires a careful chain of evidence, a narrow correction, and a way to verify that the system now behaves as intended. If a live issue is blocking your team, see the Production Bug Fixes & Software Rescue service.