[wp-trac] [WordPress Trac] #17560: Severe bug in XMLRPC and Windows Live Writer integration
WordPress Trac
wp-trac at lists.automattic.com
Wed May 25 22:43:14 UTC 2011
#17560: Severe bug in XMLRPC and Windows Live Writer integration
--------------------------+-----------------------------
Reporter: archon810 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: XML-RPC | Version: 3.1.2
Severity: major | Keywords:
--------------------------+-----------------------------
I found a pretty serious performance bug with XMLRPC and Windows Live
Writer, which is a really popular post software made by Microsoft in use
by many large blogs.
In my continuous fight to improve performance, or rather figure out what
the heck is badly slowing down my server, I noticed that I get a lot of
stuck doing_cron apache processes after posting and the load shoots up.
I ran strace on some apache processes and found that a lot of them are
stuck doing do_pings(), rolling through tons of posts using something
like:
{{{
SELECT to_ping FROM wp_posts WHERE ID = 27823
SELECT pinged FROM wp_posts WHERE ID = 27823
}}}
To figure out why a bunch of my wp cron processes are rolling through
random posts trying to ping them all the time, I ran a db query and found
that 800+ out of 2900 posts have to_ping field set to
{{{
(comma
separated)
}}}
Exactly as above, 2 lines.
So, what I think happens is a bunch of wp cron processes roll through 800
posts all the time and try to ping non-existent servers, which fails. Then
the field is not cleared and this happens again and again.
At first, I wasn't able to figure out where this value is coming from, but
then it hit me - I was able to trace it back to Windows Live Writer's
interface. Take a look:
http://farm6.static.flickr.com/5029/5760026936_50895cd36e_b.jpg.
The value here is grayed out, meaning it disappears as soon as you click
into it. However, it seems like WLW sends it along anyway, even if the
user doesn't fill it in. Then it gets put in the database exactly as above
and here we are.
I realize it's not a Wordpress bug per se, but I believe it affects a lot
of Wordpress installations that use Windows Live Writer and it's already
too late even if MS fixes it. Getting MS to fix it is a whole different
business.
So, here are my questions:
- is do_all_pings() really run every time cron runs?
- is it possible that multiple doing_cron processes end up running at
the same time due to concurrency issues on very busy servers like mine? I
see a ton of them during high load, all running simultaneously. They
should really be using a semaphore of some sort.
- can this bug be worked around in Wordpress?
Thank you.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17560>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list