Aside from a couple of blogs like this one that I manually update from time to time, I also run some autoblogs built using the WordPress Mage system. If you’re familiar with the term, an autoblog is one that has a number of future dated posts queued up to be posted on specific dates. You build the blog and let it run on autopilot from then on.

That is until WordPress 2.9.x came along…

Some of my blogs started suffering from the dreaded “Missed Schedule” problem. Now, if you’ve not heard of this, it’s a bloody annoying bug in WordPress where posts that are scheduled to be published don’t get published and get put into the “Missed Schedule” status.

Helpful as ever, WordPress possesses as no quick way of converting posts in such a status into their correct “Published” status. No, you have to do a Quick Edit on every affected post and manually change its status to “Published”. Not too much of an issue when you have just a couple of posts to fix. But if you have multiple posts on multiple blogs, it’s an impossible task.

My blogs on Webhost4SEO were affected. What I like about their hosting packages is that you get multiple Class C IP addresses with your hosting account (the number depends on the hosting package you buy, starting with 10 on the Bronze package). Having multiple IP addresses means you can spread your sites around so if Google takes a dislike to one of them, they aren’t all tarred with the same brush.

Doing a bit of research, I found that there are quite a few people having issues with “Missed Schedule” posts. Apparently, it first raised its head on WordPress 2.7, but seems to have exploded with WordPress 2.9.x. Some bugs in the cron code were introduced in WP 2.9.0 in the rush to get that version out. Supposedly, these were corrected in WP 2.9.1, yet people continue to suffer from the bug.

So there must be a fix for it, right?

Don’t hold your breath. WordPress themselves seem to be ignoring the issue completely and it’s fallen to the blogging community to come up with various fixes while waiting for the WordPress developers to get their asses in gear and fix the problem at source, once and for all.

First Fix Tried:

The first fix suggested to me was to use the Scheduled M.I.A.s plugin (apparently it’s no longer available). This purports to bring “Missed Schedule” posts back to life. It didn’t work for me. Strike one.

Second Fix Tried:

The next thing to try was to edit the wp-includes/cron.php file to change the cron job timeout which is set at a ludicrously small 1/100th of a second. Look for this line:

wp_remote_post ($cron_url, Array (' timeout' => 0.01, ' blocking' => false));

…and replace 0.01 with some value in seconds ranging from 10 seconds to 600 seconds (10 minutes), so the line becomes something like:

wp_remote_post ($cron_url, Array (' timeout' => 45, ' blocking' => false));

Didn’t work for me. Strike two.

Third Fix Tried:

The Semiologic fix consists of three modified WordPress files that again purport to fix the “Missed Schedule” bug. Guess what? Didn’t work for me. Strike three!

Fourth Fix Tried:

Replacing the wp-cron.php and wp-includes/cron.php with those files from WP 2.6.5 (these predate the appearance of the “Missed Schedule” post problem in WP 2.7). Again, this solution didn’t work for me.

Fifth Fix Tried:

Adding this line to the wp-config.php file:

define('ALTERNATE_WP_CRON', true);

This forces WordPress to use a different way of running cron that doesn’t rely on Domain Name Server settings or other server configurations. Once again, another failure. Strike Five.

More Problems:

Since playing around with the above fixes, I found that my autoblogs on my Hostgator shared hosting account are also suffering from the “Missed Posts” problem.

It appears that WP 2.9.x is more resource-intensive than previous versions of WordPress. Given that webserver configurations don’t change when a new version of WordPress is released, the finger of suspicion would appear to point jointly to a WordPress/webserver combination. In essence, WordPress 2.9 is too resource intensive for many of today’s webservers on shared hosting accounts. I don’t have any objective evidence for this, but the “Missed Schedule” problem has only affected blogs on my shared hosting accounts. It’s possible that bad webserver configurations also play a part but tracking that down can only be done in conjunction with the support people at your particular webhost.

When I submitted a support ticket to Hostgator about the issue, this was their response:

Hi Gary,

I am seeing the following processes being terminated on your account due to exceeding our resource limits for shared accounts:

– [edit: basically it’s a list of failed wp-cron.php runs]

It looks like the processes being called via wp-cron.php are being terminated by our kill script due to processing for longer than 30 seconds. Unfortunately it is not possible to be whitelisted from this, as it is used to prevent customer’s scripts who are very resource intensive from using more than their fair share of resources. I am certain this is the cause of your scheduled posts being missed, as it looks like the processing is just taking too long to complete.

Best regards,

Hostgator Support

Doesn’t bode well for getting the issue resolved on Hostgator. Since my autoblogs were pretty much dead in the water, I decided to opt for VPS (Virtual Private Server) hosting. These are effectively shared hosting plans but with fewer customers per server and more server resources allocated to any given customer (one consequence is that your sites will load faster). After looking at the plans offered by various companies, I decided to go with LiquidWeb. Their basic VPS hosting package is $60 per month and you get 4 IP addresses to play with.

I’ve now built two test autoblogs on LiquidWeb’s servers and both are publishing future-dated posts without problems. I’ve monitored them over a few days to make sure “Missed Schedule” hasn’t raised it’s ugly head again – it didn’t. [I also asked LiquidWeb to configure the server to run SiteBuilder Elite sites – no problems there]. Now it looks like I’m faced with the task of migrating all my blogs over to LiquidWeb just so they work again.

Yeesh!

Update: Jan 27, 2011: I’ve come to the conclusion that WordPress is now so resource intensive that it is not really suitable for running on a shared webhosting account. One of the big problems with shared hosting accounts is that scripts are only allowed to run for 30 seconds before they’re automatically killed off. So if anything (e.g. publishing a post) takes more than 30 seconds, that operation doesn’t complete. With posts, that puts them in “Missed Schedule” status. With other operations, you’ll see different behaviors.

Ever since moving my blogs to a reseller hosting package, the “Missed Schedule” issue has gone away. The reason: with a reseller package you get a greater share of a server’s resources and there’s no 30-second timeout on scripts. I did go with LiquidWeb for a time but they were expensive and their servers weren’t well enough specified (I’d get timeouts and nginx errors on too many occasions to warrant staying with them).

Currently, I host my WordPress blogs with two webhosts: Heroehost and Bolthosting. Both have proved very reliable and, when support has been needed, both have responded quickly to support tickets. When building blogs, I’d never go back to shared hosting; it’s just asking for trouble. There is a price to be paid for running WordPress blogs in a consistent and reliable fashion – and that’s the extra cost of a reseller hosting package. Typically, they’re 2-3 times more expensive than a shared hosting package. But that reliability is definitely worth the extra money.

All the best,

Gary Nugent

P.S.: Don't forget, if you want to create an internet income of your own, here's one of my recommended ways to do that:

Your Escape Plan  

Tagged with:

Filed under: BloggingWebhosting