Knowledgebase

Debugging Intermittent Problems Print

  • developersgitdeployment, developers, troubleshooting, caching, cron, resourcelimits, guide, howto
  • 0

Faults that do not reproduce on demand.

WHY THEY ARE HARD

You cannot test a fix if you cannot reproduce the fault.

WHAT CAUSES THEM

Resource limits reached only under load Race conditions with concurrent requests Caching serving inconsistent content A scheduled task interfering periodically External service failures One server in a set behaving differently Time-dependent code

THE APPROACH

Log more. Add logging around the suspected area, including a timestamp and a request identifier, so you can correlate.

Correlate with resource usage graphs. A fault occurring only at peak times is a resource problem.

Correlate with scheduled tasks. A fault every hour at the same minute is a cron job.

Ask affected users for specifics: exact time, what they were doing, which browser, which device.

CHECK CACHING

Inconsistent behaviour between visitors is frequently a caching problem: one visitor served a cached version, another not.

PATIENCE

Intermittent faults take longer. Gather data before theorising, and resist changing several things at once.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot