owen

Have you noticed slowness when posting lately? I’ve seen more than a few recommendations on how to fix this issue, but no real fix for the fix.

WordPress 2.0 has moved the essential trackback/pingback/enclosure mechanics into a special script that gets loaded separately from when you publish a post. Instead of cycling through all of the pingbacks and trackbacks that it has queued before returning control to the browser (like in version 1.5), the publication process spawns a request for the special script and just continues normally.

The result is that you don’t wait for pingbacks to finish when you publish, and they still get published properly, but in the background. So what’s causing the big delay these days, if that mechanism is set up to prevent it?

There is something else that causes the publication process to wait on a response from an external site: Pinging.

When you publish a post, you can configure WordPress (via the Options>Writing page in the admin) to ping certain servers to notify them that you have published your post.

There are a number of services that respond to these pings, and by default WordPress uses Pingomatic. Pingomatic is a one-stop ping service – You ping it, it pings many different services for you automatically. The trick is that you have to wait for Pingomatic to return before the Post page finishes publication.

Normally this isn’t a problem. Pingomatic service has always been pretty fast. But in recent days, people have noticed that the ping process is really slowing things down. In some cases, you get the “White Screen of Death” after clicking Publish and waiting around for a while. Control never comes back to the admin page, and your copy of WordPress dies waiting for a response from the ping server.

I have seen a bunch of people come into the #wordpress IRC channel asking why their site now publishes slower with WordPress 2.0, now that they just installed it, than it did with WordPress 1.5, especially with the new trackback/pingback code in place that was supposed to eliminate that problem. The solution for every one of them has been to remove “rpc.pingomatic.com” from their ping list.

Take a look at the scatter graph of response times for Pingomatic over the past few days. At one point, these numbers were looking really good. And for a service that is growing as quickly as Pingomatic, even the response we’re seeing here is worthy of respect. My server wouldn’t handle it. But that’s little comfort to me when I’m wondering if my post was successfully published and pings were sent as expected.

Pingomatic PerformanceIn fact, a look at the top and bottom twenty sites monitored by Grabperf now shows Pingomatic as 3rd from last place in performance.

I personally removed Pingomatic from the ping list of Asymptomatic and saw instantaneous publication after many WSoDs. But now what? If you remove Pingomatic from the ping list, there isn’t usually anything left. If you still want your site to ping some places, what do you do?

Here’s a list of RPC entry points for the sites that Pingomatic pings. If you replace rpc.pingomatic.com with this list, it should accomplish the same thing as Pingomatic:

http://rpc.weblogs.com/RPC2 http://ping.feedburner.com http://api.feedster.com/ping.php http://www.blogdigger.com/RPC2 http://api.moreover.com/RPC2 http://www.newsisfree.com/RPCCloud http://ping.blo.gs/ http://www.syndic8.com/xmlrpc.php http://api.my.yahoo.com/RPC2 http://ping.weblogalot.com/rpc.php (Currently shows a PHP error) http://topicexchange.com/RPC2 http://rpc.technorati.com/rpc/ping http://rpc.newsgator.com/ (Seems non-existant?) http://xping.pubsub.com/ping/ http://www.blogstreet.com/xrbin/xmlrpc.cgi (Seems non-existant?) http://rpc.icerocket.com:10080/

I had trouble locating working entry points for Weblogalot, Newsgator, and Blogstreet. If someone knows valid working URLs for those entry points (or better URLs for the ones I’ve published), please comment. Use these at your own risk!

There are some other lessons to take away from this experience, in addition to getting your post publication time down to something reasonable. First, don’t ping a service more than once for the same post. Some of these services won’t even accept more than one ping before they’ve spidered you (it seems that Tenchorati works this way, from what I’ve seen). If you do that, there’s a good chance you’ll be banned as a spammer. Currently, I’m not even sure how you would get yourself removed from such a spam list, but suffice to say that your updates won’t go out like they used to.

For that reason alone, you should be very wary of what services you add to your ping configuration, especially if you are concerned about notifying the world of your publication. I advise strictly against adding those huge lists of ping sites directly to your ping site list, because not only could there could be duplicates, but many of the sites on those lists are special-purpose sites.

Special-pupose ping sites are sites that accept pings for blogs of certain topics. Primarily, they are oriented to specific geographic regions and languages. If you are an English blogger, and you ping a Japanese ping site, it’s possible that you will be considered a spammer. This is generally a bad policy. It’s always a good idea to check with the ping service you’re going to use before adding it to your list.

Keep in mind - the more ping sites you add, the longer it will take to ping. If you know which sites are the most important ones to you for getting your publicity, use only those sites for a faster return. Do you even need to ping sites? If not, remove them all!

Hopefully there will be some update to Pingomatic or WordPress that will soon fix these delays.