WordPress.org

Ready to get started?Download WordPress

Forums

DB Cache Reloaded Fix
Cron Overload (5 posts)

  1. gtim19
    Member
    Posted 2 years ago #

    The cron event this plugin creates overloaded the cron schedule and drastically spiked our server load.

    I only had this plugin installed for a few days and removed it after not seeing much of a different with our database load. I then noticed a spike of CPU usage on our server, and noted it was coming from our cron files (I run a multisite). This was because of 100+ instances of an hourly event. Here is the line of code I noted as being the cause.

    add_action('clean_cache_event', array(&$this, 'hourly_clean'));

    This is being run way too many times, and not removed during uninstall. At the very least this needs to be changed to a one-off event if it is going to keep adding to the site.

    http://wordpress.org/extend/plugins/db-cache-reloaded-fix/

  2. Stufo76
    Member
    Posted 2 years ago #

    Hi all,
    I installed this plugin and I have same issue: a lot of cron jobs "clean_cache_event".
    How can I fix?

  3. astereo
    Member
    Posted 2 years ago #

    I would love for this issue to be fixed / changed. I found with my personal site that using this plugin + cloudflare gives me awesome results (load time usually <= 1s), but I do not want to tax my shared server. I also would really like to implement this into my universities network, but being they are a multi-site install I would not try it until these cron issues are taken care of.

    Thank you!

  4. elena.tanasoiu
    Member
    Posted 1 year ago #

    Here is a function to remove the clean cache event:

    function wpse39681_clear_all_crons( $hook ) {
        $crons = _get_cron_array();
        if ( empty( $crons ) ) {
            return;
        }
        foreach( $crons as $timestamp => $cron ) {
            if ( ! empty( $cron[$hook] ) )  {
                unset( $crons[$timestamp][$hook] );
            }
        }
        _set_cron_array( $crons );
    }
  5. ogergo
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic