WordPress.org

Ready to get started?Download WordPress

Forums

Simple Login Log
Performance issue: SELECT * FROM wp_simple_login_log on each hit of wp-login.php (9 posts)

  1. Dan & Jennifer
    Member
    Posted 11 months ago #

    Hey Max!
    We're running Simple Login Log on a WordPress Multisite, network activated - and only started seeing this problem in the last 2 months or so...
    We've been debugging a significant performance issue on our server for a while... and after a lot of digging, we isolated it to a full table retrieval query coming from Simple Login Log.
    It seems this query below is hitting the database for every page-view of wp-login.php - not for attempted login, but litearlly just going to wp-login.php triggers it:
    SELECT * FROM wp_simple_login_log
    Screenshot: http://www.screencast.com/t/SUcQLkOK14
    I'm not sure off hand what other wordpress pages generate might also trigger query... but I was able to verify it happens with wp-login.php
    I would thing this query should only run when one clicks on the WP admin -> Users -> Login Log menu, right?
    But for some reason it's being triggered in other areas as well and basically bringing down our MySQL and the server along with it.
    As soon as I disabled the Simple Login Log plugin, our MySQL became almost dormant lol, the performance issues disappeared completely.
    But before that, I could do "mysql> show processlist;" repeatedly over and over and always see a couple of these queries - in spite of how quickly MySQL processes and completes the queries.
    But we'd really like to re-enable it! :-)
    Could you please check this out and see what the fix may be...
    This is a high traffic site and we don't prune the login log table, as we keep those records. This might not have been noticed on a low traffic site or a site where the records are purged regularly. :-)
    We only started seeing these performance issues some weeks ago, maybe 2 months. So maybe a bug snuck into the latest update or two?
    Thanks!
    Dan

    http://wordpress.org/plugins/simple-login-log/

  2. Dan & Jennifer
    Member
    Posted 11 months ago #

    Just checking in on this. :-)
    Thanks!!
    Dan

  3. Dan & Jennifer
    Member
    Posted 9 months ago #

    Hi there! just checking in on this to see if a fix is coming. :-)
    Thanks!!

  4. Dan & Jennifer
    Member
    Posted 6 months ago #

    Hey Max! I see there's a new release - can you please confirm if this issue has been fixed in this release? :-)
    Thanks so much!
    Dan

  5. Max Chirkov
    Member
    Plugin Author

    Posted 6 months ago #

    Hi Dan,

    sorry - no I never seen your post. I'll look into the issue ASAP. Thanks for your persistence, I really appreciate pointing this out.

  6. Max Chirkov
    Member
    Plugin Author

    Posted 6 months ago #

    Hi Dan,

    I looked into the issue you described and can not see it happening on my end.

    The only place where it's grabbing all data is on table schema update. Yea, I agree - it shouldn't be doing that and I will make a change, but if you successfully updated, it shouldn't do it on every wp-login.php load. It doesn't do it on m machine. Could you please update to the most current version and double-check for me?

    Thanks

  7. Dan & Jennifer
    Member
    Posted 6 months ago #

    Hey Max!
    Great to hear from you, thank you! So just to clarify, are you seeing what was causing the full-table-scan of the logins table on each load of wp-login.php?
    And is there a way to remove the scanning of that table for the login process?
    It took a while to figure out that's what was causing it - but apparently there are some very common wordpress attacks in the wild now, doing lots and lots of submit to wp-login.php to try and break into a site. i.e. dictionary attacks.
    That's not really a problem for us, BUT our login log table has over 100k entries and keeps growing - we need to keep that data for a long period (read: indefinitely)... we don't purge it.
    So I just need to ensure that the login process does not scan that table. :-)
    Thanks!!

  8. Max Chirkov
    Member
    Plugin Author

    Posted 6 months ago #

    Hi Dan,

    I realized that my logic for displaying results in the back-end was flawed - it was, in fact, querying all records multiple times. BUT - that was not happening on the login page - just on the Users/Login Log admin page.

    There is only 1 instance of a request that gets ALL results - it's the export ALL function.

    v.1.0.1 will have the SQL queries fixed.

  9. Dan & Jennifer
    Member
    Posted 6 months ago #

    Thanks Max! Just re-enabled it, will update you if we see any issues. :-)

    >> v.1.0.1 will have the SQL queries fixed.
    Great, anything that helps will be great.

    BTW considering we're NOT going to be purging the log table (so it can reach millions of rows in not too long), I was wondering if there's an index on that column to help keep username queries fast?

    Also, this is non-related, but I just added a suggestion for quick access user/site action links for enhanced usability here:
    http://wordpress.org/support/topic/quick-access-links-in-login-log-view-like-wp-user-listing-has?replies=1

    Thanks!
    Dan

Reply

You must log in to post.

About this Plugin

About this Topic

Tags