Opened 8 years ago
Closed 6 years ago
#40022 closed enhancement (wontfix)
Too much data in wp_options entry where option_name = 'cron' drags down WP
Reported by: | yannielsen | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.7.2 |
Component: | Cron API | Keywords: | |
Focuses: | Cc: |
Description
Recently I experienced an installation running on a Cloud Server with 10GB RAM, 4 CPU cores being dragged down because of a plugin 'malfunctioning' with cron events.
The plugin created excessive amounts of extra entries in wp_options entry where option_name = 'cron' resulting in a 15,4MB entry in the table.
It wasn't a "endless loop"-error that suddenly resulted in it. It had gone unnoticed for quite some time before it got to the point where the server timed out because the requests to the database simply became too slow.
The plugin should ofcourse not be doing that, but it got me wondering if it was an idea to implement a mechanism to split up the 'cron' entry into multiples when passing a threshold?
Change History (5)
#2
@
8 years ago
Thank you @pothi :-) I'm considering just coding this "right away" if noone else is working on it and if it's deemed to be a good idea :-)
#4
@
8 years ago
In this case, a plugin misbehaved and created a huge cron option. That's not that different to a plugin bloating up the posts table or another option in the database, IMHO.
If you want to "fix" it for cron specifically, I'd suggest going with #15148 or something like Cavalcade.
Welcome to WP core trac.
Of course.
Probably, WP could get some inspiration from https://github.com/humanmade/Cavalcade .