0

I recently updated to wordpress 4.3 and I noticed an increased memory usage on my server. Sometimes the memory usage is as double as the previous one.

Does anyone has the same experience.

1 Answer 1

3

Yes, we experienced the same problem. It's related to cron events. Reversed arguments for scheduled task to split terms can cause the database to explode.

There is a major bug that has been resolved, see this ticket.

@Otto posted a solution to this bug in the WordPress support forums here. This solution worked for us.

Simply put, open wp-includes/taxonomy.php and replace:

wp_schedule_single_event( 'wp_batch_split_terms', time() + MINUTE_IN_SECONDS );

With:

wp_schedule_single_event( time() + MINUTE_IN_SECONDS, 'wp_batch_split_terms' );

On top of this, you need to create a must use plugin with the following code:

<?php
function clear_bad_cron_entries() {
    // Fix incorrect cron entries for term splitting
    $cron_array = _get_cron_array();
    if ( isset( $cron_array['wp_batch_split_terms'] ) ) {
        unset( $cron_array['wp_batch_split_terms'] );
            _set_cron_array( $cron_array );
    }
}
clear_bad_cron_entries();

Run that only once.

I would highly recommend that you read through Otto's detailed guide on this if you don't know what you are doing.

There is also a hotfix plugin available here.

The answer to why WordPress hasn't carried out a 4.3.1. push with more than two weeks of discovering this bug is completely beyond me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.