One Step Backwards, Two Steps Forward

Michael Cain

Michael is a systems analyst, with a taste for obscure applied math. He's interested in energy supplies, the urban/rural divide, regional political differences in the US, and map-like things. Bicycling, and fencing (with swords, that is) act as stress relief.

Related Post Roulette

8 Responses

  1. Thanks for the writeup, and the work. SOTD is one of my favorite site features, one I use a lot.

    Your explanation makes perfect sense, but I’m curious how you diagnosed the problem.Report

    • Michael Cain in reply to Mike Schilling says:

      Will had largely pinned the problem down to too many simultaneous PHP threads trying to run. In my mind there were basically a couple of situations that could cause that. One was a small number of very long-running threads that eventually accumulate. The other is a much larger number of medium long-running threads with variability in load. Add some positive feedback when errors start occurring and either could produce serious problems that only gradually cleared. Will suggested that the first could be caused by code errors, eg, infinite loops. I didn’t want to look for that in SotD* so investigated the other possibility. The crawlers hammering at SotD, particularly the commenter archive parts, was an obvious candidate once I recognized it. Given the improvement since blocking that, it was probably the underlying problem (this time).

      * Turning SotD into honest-to-Knuth production code would, IMO, require a real rewrite. The current code is largely free of error handling and data checking. Consider the situation if you want to handle errors in code that runs on WordPress. Now that PHP has try-catch exception handling, some WordPress core functions throw exceptions. Some core functions that predate try-catch return WP_error objects. Some core functions that return WP_error objects do so only if you ask properly. And some core functions simply don’t indicate errors at all.Report

  2. North says:

    Thank you so much Michael. I don’t know how our lil community can honor you folks who make the bits boink and keep the lights on but you (and CK McLeod before you) deserve every praise.Report

  3. Jaybird says:

    Oh my gosh, this is awesome.Report

  4. Cannot thank you enough for all the hard work you do.Report

  5. Oscar Gordon says:

    Most excellent!Report

  6. Michael Cain says:

    On Feb 9, the site was “attacked”, with page requests exceeding 20 per second at times. That’s about ten times the normal peak load. The hosting arrangement is simply not adequate to deal with that.Report