admin管理员组

文章数量:1298180

I recently noticed after performance errors and failure that the memory that a single request was consuming (either front or back) was increased rapidly. After hours of experiments and research I noticed that the option_value record of the "cron" row was 7MB!!!! containing a huge json with a loop of "reschedule" action.

It seems something like an attack and prepare to see it again? How I can protect my site from these cron values?

I recently noticed after performance errors and failure that the memory that a single request was consuming (either front or back) was increased rapidly. After hours of experiments and research I noticed that the option_value record of the "cron" row was 7MB!!!! containing a huge json with a loop of "reschedule" action.

It seems something like an attack and prepare to see it again? How I can protect my site from these cron values?

Share Improve this question asked Sep 4, 2015 at 14:19 CookforwebCookforweb 136 bronze badges
Add a comment  | 

3 Answers 3

Reset to default 1

This could be caused by many different things, as well as a result of a broken cron setup, where actions are being scheduled, but never run.

The best way forward is to try and understand what is actually being scheduled or rescheduled, what are the action names? If you can find the action names, you'll be able to pinpoint it to a specific plugin or theme (or core for that matter).

If you have WP-CLI available to you, you could run:

wp cron event list

Though with 7mb of cron data, that can take a while, so be patient. When you figure out the action name, you can delete them all with:

wp cron event delete <action_name>

If you don't have WP-CLI access, you can try to inspect the option value directly in the database (via phpMyAdmin or MySQL CLI), or in your database export .sql file.

I do not recommend disabling the WordPress cron as somebody else suggested here, as this will not prevent new actions from being queued, and will also break cron-dependant functionality across the entire site, including things like scheduled posts, update checks, etc.

Hope that helps.

You might be suffering from a bug introduced with WordPress 4.3, involving term splitting.

There's a hotfix plugin available here: https://wordpress/plugins/wp33423-hotfix/

why don't you disable wp-cron.php file? Simply paste this code in your wp-config.php file and no scheduled task works after you disable the cron file.

define('DISABLE_WP_CRON', true);

本文标签: Huge cron optionvalue into wpoptions table