alda,
@alda@topspicy.social avatar

An issue that I ran into last week:

A business sought me out because of an issue with a site they were running. The server got overloaded and crashed every 3 hours for half an hour at a time and it was important to get to the bottom of this.

The hints that I got were that the site had been migrated to a new server in order to isolate it and that the issue started when someone was hired to integrate certain accounting software with it. 🧵

alda, (edited )
@alda@topspicy.social avatar

So I started monitoring things — and yes, it the server crashed every 3 hours as exponential amounts of memory were being reserved until the machine crashes.

I had a hard time isolating the issue as it seemed to stem from index.php (which is unusual), so I did the usual thing and cleaned out some large-ish values from the wp-options table and installed memcached.

Then I contacted the guy who had done this accounting software integration, who rambled something about a cron job.

alda,
@alda@topspicy.social avatar

I didn't find anything in the list of cron jobs on that machine and WordPress did not have a plugin or a wp-cron job that indicated anything happening every 3 hours.

The guy also rambled something about our machines being seriously underprovisioned, so we allocated more memory and CPU cores for this and while it did recover quicker, it still crashed regardless of havin 16 GB of memory and 4 cores.

And it was index.php of all things that was blowing everything up every 3 hours on the hour.

alda,
@alda@topspicy.social avatar

So, it happens regularly, it is index.php, there's no plugin doing this and the WordPress core has not been modified.

Weird, right?

alda,
@alda@topspicy.social avatar

It turns out that the guy who had been contracted for the accounting software integration had modified the active theme to include an obscure and weird PHP class that syncs the available products/SKUs with the accounting software.

This was a heavy task and took about a minute to run manually and was triggered by a request to index.php, using a specific GET parameter.

alda,
@alda@topspicy.social avatar

Then an actual Linux cron job was being run on the old server every 3 hours. It would run wget on index.php with that specific GET parameter set.

If there was no response or the status was not "200 ok", it would try again and again.

Again and again, until the machine crashed.

alda,
@alda@topspicy.social avatar

The morale of the story?

Hire a professional to work on your website.

I know it is difficult to filter us out of the rest of the bunch consisting of gold diggers, fraudsters and hacks, but we are usually available on a short notice in case something like this happens.

vickifarmer,

@alda ‼️‼️‼️

Bless their hearts.

donncha,

@alda I saw something like that happen on my own site for a long time. I could never figure out what it was but I think it might be some oddness between PHP and Apache. I created a cron job that ran ever minute to request the front page. If it failed it would give Apache a kick. Still happens occasionally, but once in a blue moon now.

alda,
@alda@topspicy.social avatar

@donncha Interesting! However the hosting company I have been contracting with doesn't run Apache any more except in cases where a site is still running PHP 5.6.

It's all Nginx and PHP-FPM now, with Litespeed PHP as an option. :)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • wordpress
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • osvaldo12
  • slotface
  • khanakhh
  • kavyap
  • InstantRegret
  • Durango
  • provamag3
  • everett
  • cisconetworking
  • Leos
  • normalnudes
  • cubers
  • modclub
  • ngwrru68w68
  • tacticalgear
  • megavids
  • anitta
  • tester
  • JUstTest
  • lostlight
  • All magazines