Tuesday, December 30, 2008

Operation: Long Rescue

Apologies for the lightish blogging: I spent a good deal of yesterday trying to get Longrider back up and running. It's a surprisingly difficult process: WordPress's XML import only allows file sizes of 2MB and, even after hacking the script to allow up to 22MB, Longrider's 19.5MB of data just kept ensuring that the webpage timed out.

Eventually, I had to go into the database administrator on my server and paste in the SQL dump. However, this caused issues on its own (different admin backends, I suspect) and it was only after three hours or so of removing corrupted tables, hacking out unused data and generally cleaning things up that I finally managed to get things up and running.

And this morning a corrupted table brought the whole thing down again. Might I advise those running WordPress not to install a plugin called WP-User-Online; it was this that was causing a lot of the problems, with both my own server and with Longrider's original hosts.
Update: I wrote the original post two days ago – but it became lost during the recovery. Since then, someone called Jonathan has replied [from LR's hosting company]:
I’ve spent some time reviewing the Slow MySQL Queries logs and what I’m seeing, up until the 26th when there appears a query should the addition of a Cache plugin, before this point resides thousands of slow queries, each suggesting use of Whos Online plugins, as well as other plugins that are poorly constructed, and have simply been running rampant on the server.

Who’s Online plugins make database hits for each request made to the server, this counts for the same visitor refreshing the same page, viewing images, as well as any CSS, Javascript, external php files, pretty much everything loaded in association with your site, so with one page load, the Who’s Online plugin can log up to a thousand database hits easily, if there are lots of assets involved, and when we talk more than one visitor at the same time, the whole mess can get out of hand on an exponential level.

Yikes. Seriously, one should be very careful of all of these plugins: many, indeed most, are pretty robust, but it only needs one rogue to bring down your installation and, probably, your host's servers...

2 comments:

Longrider said...

Indeed - many thanks for your help.

Had the host answered my original question, which was: "What is causing the problem?" back in November, all of this would have been avoided. Removing a rogue plugin is a simple matter, but only if the people concerned communicate.

By the time Jonathan came into the discussion, our relationship had deteriorated beyond repair.

Andi said...

You can use the WP-DBManager plugin to run queries on the WordPress database, including running backup/restore operations.

http://wordpress.org/extend/plugins/wp-dbmanager/