• Resolved Tranny

    (@tranny)


    I run a busy high traffic and high community participation site, so MySQL has always run very high on my server. But after upgrading to v4.3 (no other change), my CPU load tripled, and it’s crippling the server, causing frequent crashes and generally degraded responsiveness.

    The site is hosted on a high end dedicated server with 4 SSD drive in hardware RAID. I spoke with my host and they assured me no changes have been done to the server, and all server side applications are up to date.

    Problems started after the update to v4.3, No other change whatsoever has been done to neither the WP installation, nor the server itself.

    My log shows high http connection count, which use abnormally high CPU never seen before:

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    17368 mysql 20 0 9348m 441m 6852 S 42.0 1.8 8:35.43 mysqld
    17941 xxxxx 20 0 1474m 54m 4748 S 27.5 0.2 0:10.38 httpd
    18526 xxxxx 20 0 1463m 43m 4680 S 27.1 0.2 0:01.42 httpd
    16675 xxxxx 20 0 1467m 46m 4284 S 24.8 0.2 0:17.30 httpd
    16830 xxxxx 20 0 1463m 42m 4300 S 23.5 0.2 0:16.92 httpd
    17777 xxxxx 20 0 1454m 34m 4780 S 23.5 0.1 0:11.56 httpd
    18358 xxxxx 20 0 1460m 40m 4760 S 23.5 0.2 0:04.49 httpd
    17881 xxxxx 20 0 1460m 40m 4716 S 23.2 0.2 0:09.88 httpd
    18220 xxxxx 20 0 1441m 21m 4768 S 23.2 0.1 0:05.12 httpd
    18472 xxxxx 20 0 1460m 40m 4748 S 23.2 0.2 0:04.12 httpd
    18331 xxxxx 20 0 1505m 84m 4700 S 22.5 0.4 0:04.02 httpd
    16892 xxxxx 20 0 1463m 43m 4316 S 22.2 0.2 0:09.67 httpd
    16872 xxxxx 20 0 1441m 20m 4240 S 17.9 0.1 0:21.70 httpd
    18248 xxxxx 20 0 1446m 26m 4756 S 16.9 0.1 0:03.51 httpd
    16479 xxxxx 20 0 1461m 41m 4688 S 16.2 0.2 0:19.24 httpd
    16870 xxxxx 20 0 1458m 37m 4216 S 16.2 0.2 0:16.59 httpd
    18452 xxxxx 20 0 1474m 54m 4652 R 14.2 0.2 0:01.97 httpd
    16729 xxxxx 20 0 1461m 40m 4208 S 12.2 0.2 0:18.65 httpd
    16978 xxxxx 20 0 1455m 35m 4248 S 9.3 0.1 0:11.55 httpd

    Can anyone help me out with this? What happened? This is the first time I see my server getting crippled after a WP update and I’ve run this particular site on WP since 2008.

Viewing 15 replies - 31 through 45 (of 96 total)
  • How could i run it on a site wich is online? It spawns processes and server crashes?

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    The instructions I gave work fine. Just follow them exactly.

    If i put the script online on a live site then for every visitor the script will be started, right?

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    @vangelis183 For the minute or so that you leave it there, yes. Again, you only need the script to run one time. You put it there, visit the site, then remove the script. Simple.

    Also, leaving it there won’t cause any issues. It checks to see if there are any entries to remove, and if not, then it doesn’t do anything. That’s what the if ( isset( $cron_array['wp_batch_split_terms'] ) ) { line is for.

    We’ve implemented this is our MU-plugin (so we can roll it out with a mass deploy).

    add_filter( 'schedule_event', 'schedule_event_unset_batch_split_terms' );
    function schedule_event_unset_batch_split_terms( $event ) {
    	if ( $event->timestamp == 'wp_batch_split_terms' ) {
    		return false;
    	}
    
    	return $event;
    }

    But its really sad that this is a known issue for 5 days (and closed 3 days ago). For a developer this bug is really annoying. For a non-technical type this could just break their site.

    Is there a reason that there has not been a release yet? This could break alot of sites.

    fix does not work, edit taxonomy.php but every second new cronjobs are added http://take.ms/nL8kC

    how can I stop it?

    @otto42 Hi Samuel
    I run the fix but there are just too many cron jobs scheduled. It runs forever. Is there anyway to safely clear/reset wp_batch_split_terms ?

    I restored the cron field from prior wp 4.3 update with a

    UPDATE wp_options SET option_value = ‘<insert old values here’ WHERE option_id = <insert option_id that holds the cron values>

    My site is back to normal performance now

    I run the fix but there are just too many cron jobs scheduled. It runs forever.

    this problem exists here as well

    You need to clean up all the cron jobs that “the fix” created.

    The best way is to get the value from the cron field in wp_options from prior the upgrade.

    It had inserted more than 5000 rows in my cron field, and that cost a lot of performance

    @gordan43dom and @rené

    This is not what i did but you could try to delete the contents of the cron row in wp_options

    I dont know if this is a possible solution. But you could try. Just backup your DB in any case before you try.

    @vangelis183 I thought about that , but there are just too much unknown stuff that can happen.

    @vangelis183 I thought about that , but there are just too much unknown stuff that can happen.

    That’s why you should use a backup.

    I use backup-buddy, and there it’s in cleartext per row.

    It took me 10 seconds to write the sql and get back to normal.

    I made a hotfix plugin that stops WordPress from spamming the cron option:

    https://github.com/phh/wp43-stahp-spamming-my-cron

    I made a hotfix plugin that stops WordPress from spamming the cron option:

    https://github.com/phh/wp43-stahp-spamming-my-cron

    Hi Patrick.

    1. Where would you put it. In mu-plugin or in an ordinary plugin.

    2. Since I’ve allready fixed the taxonomy.php and cleaned up my DB, do I need it?

Viewing 15 replies - 31 through 45 (of 96 total)
  • The topic ‘High CPU Load After Update to v4.3’ is closed to new replies.