WordPress.org

Ready to get started?Download WordPress

Forums

BruteProtect
[resolved] BruteProtect adding hundreds of records to "wp_options" DB table (10 posts)

  1. KirkM
    Member
    Posted 8 months ago #

    Hi Sam,

    Since installing BruteProtect to my WP powered website I've noticed that my sites "wp_options" database table has suddenly gone from 750 entries to 1185 and counting. All of which are formatted as such:

    _site_transient_brute_loginable_[IP address]

    and...

    _site_transient_timeout_brute_loginable_[IP address]

    The IP addresses for both types of entries appear to be identical meaning there's an entry for each IP address for:

    _site_transient_brute_loginable

    And then another entry for the same IP address for:

    _site_transient_timeout_brute_loginable

    These entries are increasing on a regular basis. Knowing that the more entries in the WP database tables the longer the site load time, is this normal for BruteProtect to keep adding to the "options" tables like it's doing?

    Note: Long ago I changed the prefix to the "wp_options" to something other than "wp" of course, for security purposes.

    http://wordpress.org/plugins/bruteprotect/

  2. Sam Hotchkiss
    Member
    Plugin Author

    Posted 8 months ago #

    Hey Kirk-- we use these transients to track blocked IPs to minimize API calls. These are not autoloaded, so they shouldn't be slowing down your site by any significant measure-- since they are transients (as opposed to true "options"), they are cleared out as they are no longer needed.

  3. KirkM
    Member
    Posted 8 months ago #

    Sam,

    I edited my entry just as you replied (timing is everything?). Just one more question then? How are these entries cleared out? I've been using WordPress for years but not being a programmer I'm hardly aware of how everything works. Just asking.

    And thanks for your quick reply.

  4. Sam Hotchkiss
    Member
    Plugin Author

    Posted 8 months ago #

    Hmmmm... this is interesting-- I always thought that WP cleared out expired transients on its own, but apparently it only clears them if you attempt to access them again.

    So we will be adding in a daily cron to delete our expired transients.

  5. KirkM
    Member
    Posted 8 months ago #

    Hey Sam,

    On that note, I've never known WordPress to "auto-clear" transients without user intervention so to speak so very glad to hear you're going to add a cron job to do so. Many thanks!

  6. David Anderson
    Member
    Posted 8 months ago #

    Hi Sam,

    Unfortunately it's true that WordPress only clears expired transients when you attempt to access them. If you don't attempt to access any particular transient, then it remains forever. This has bitten me in the past - I've had options tables that have grown huge and slowed the whole site down. This plugin has SQL code that cleans out all transients, which you could adapt to just clean yours: http://wordpress.org/plugins/artiss-transient-cleaner/

    Also WooCommerce has code to do the same for its transients.

    David

  7. Tevya
    Member
    Posted 8 months ago #

    This seems to be a common misunderstanding and a lot of plugins end up leaving their transients in your database. Hadn't seen the plugin David linked to, but it seems like one everyone should be using. Would be nice if it could be set to run once a week or something like that to clean all expired transients.... Or does it do that? I can't tell for sure from the screenshot verbiage.

    EDIT: nevermind. I see in the FAQ that it runs alongside the normal WP garbage cleanup.

  8. Sam Hotchkiss
    Member
    Plugin Author

    Posted 8 months ago #

    New BP update now cleans up transients daily, thanks for your feedback, guys!

  9. Tevya
    Member
    Posted 8 months ago #

    Hehe. Thanks for the shoutout in the changelog.

  10. KirkM
    Member
    Posted 8 months ago #

    Many thanks, Sam. Always glad to work with a plugin author willing to take feedback and correct problems. And thanks as well for the shout out in the change log.

    @David - Thanks for pointing out the Transient Cleaner plugin. I only use a few plugins but that one is a keeper. Beats trying to clean 100s of transients manually.

Reply

You must log in to post.

About this Plugin

About this Topic