me240
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Cron unschedule event error for hook@domainsupport I think this is not only database issue.
- Duplicate CRON causes difference between cache and database, and Cron unschedule event message is logged.
(described in https://www.ads-software.com/support/topic/cron-unschedule-event-error-for-hook/page/9/) - There is a mechanism to prevent duplicate CRON, but it doesn’t seem to work perfectly.
- As you explained, changing CRON to be fired by the system will almost certainly prevent duplicate crons.
(I have confirmed that the same results are obtained on my site.) - But for some sites (like using hosting services) CRON cannot be changed to fire from the system.
Forum: Fixing WordPress
In reply to: Cron unschedule event error for hookI had this problem again on my site and noticed that the cron in alloptions stored in the object cache was different than the cron in wp_options in the database.
These values are set by functions such as update_option, but since exclusive control is not performed, if multiple processes/threads (not limited to concurrent cron) set the values at the same time, different values may set.
update_option has a check that does not update unless the value changes, but this check is based on the object cache. Therefore, the same value as in the database bypasses the check, resulting in 0 updates where previously reported.So I added the following code to the theme’s functions.php and the error disappeared.
wp_cache_delete( 'alloptions', 'options' );
Performance will be affected, but I will see how it goes in this state for now.
My solution is still working. But that is only for version 4.6.1 of this plugin.
I expect the problem to be solved in the next version.I added this line to functions.php and delete it after a while.
update_option('wp-structuring-markup', array('version' => '4.6.1'));
Then, settings have been enabled for a week.
- Duplicate CRON causes difference between cache and database, and Cron unschedule event message is logged.