0

Right now about 25% of the entries in my access log (which do not show resource like css, images, etc) are requests to wp-cron.php. I assume there is some process event that got "stuck" and keep firing but how can I find which one?

It is a live server there the amount of hacking I can do at the code to find the problem is limited.

1

I would create a simple plugin that spits the data out into a private admin page, you basically want to use:

$cron = _get_cron_array();
$schedules = wp_get_schedules();
$tranny = get_transient('doing_cron');
//var_dump or loop over these

There are several plugins that do this that style the output to make it easier to read and organize, also make sure you don't have anything manually hitting the wp-cron.php (like a server side script).

Also read this: Are transients garbage collected?

0

A pretty elegant way to go with this is to install Debug bar plugin, which is a great tool for developers + it's addon Debug bar cron.

0

While @Wyck's and @vlood's answers are good for many scenarios, I ended up with another way to isolate where the problem might be by just directly surfing to example.com/wp-cron.php which in my case triggered properly all events which means that the problem is most likely with the wp cron lock mechanism which uses the doing_cron transient.

  • This is why in some situations you disable WP cron and just manually hit that url with a server side script. – Wyck Dec 26 '14 at 16:52
  • @wyck, yeh not sure if I should spend time on debugging (nothing too critical done by cron right now) or just set a real cron to activate it. should probably post another question about how that transient is supposed to work at all. – Mark Kaplun Dec 28 '14 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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