• Resolved hildansju

    (@hildansju)


    hi. I like the plugin and thanks for the work but I’ve noticed mysql datebase is extremely bloated, after invetigating the issue, I see that the file that has the most size is the itheme file. the file has over 2.7 gb in data and about 5000 rows. I have tried to delete some data using commands on the mysql interface but it seems it did not work.

    regardless, this is a recent issue and the bigger deal is that the log file only goes back to February 17 of 2023, so its like two months back only and its this size. for the love of god please help, how can I clean it and make sure the size is not this large

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @hildansju,

    … I see that the file that has the most size is the itheme file.

    You mean, the biggest table is the [prefix_]itsec_logs table ? (where [prefix_] should be substituted with your own database table prefix).

    If so, you should know that by default the logs table contains data for the past 60 days (which matches the 2 months you already found). However this is customizable from the plugin UI. Navigate to:

    Security > Settings > CONFIGURE

    Then scroll down to the Logging section where you should see the DAYS TO KEEP DATABASE LOGS setting.

    That said it’s probably best to navigate to the plugin Settings > Logs page to see which feature is adding the most entries (Local Brute Force is a good candidate). Make sure you are on the All Events view and filter for every available module. Then let’s take things from there.

    • This reply was modified 1 year, 3 months ago by nlpro.
    • This reply was modified 1 year, 3 months ago by nlpro.
    Thread Starter hildansju

    (@hildansju)

    yes, the prefix is my database name. I have now went to the logging section and made it so that only data up to 30 days will be kept. I checked the logs and the local brute force is responsible for about 2800~ entries, ip check has about 1000 entries.

    my question is the following, after the change i made to how long the entries should be kept, when will it take effect on the mysql side? as in I see the size went down?

    also, whats the next step? how can I delete useless things? i attempted to do so with making commands depending on certain timestamps, it says it worked in the command link in phpmyadmin but its not reflected in the file size. please help

    Hi @hildansju,

    When installed (and activated) the iTSec plugin created a (WordPress) Cron job (purge-log-entries) which runs daily. So in worst case scenario it will take max 24 hours.

    If you want to know exactly when the purge-log-entries cron job runs, enable the iTSec plugin Debug menu option as described in this iThemes Help Center article.

    If the Local Brute Force module has the highest number of log entries AND those entries are indeed responsible for the majority of the logs table size, it’s probably best to enable the plugin features (if not already) that prevent these brute force attacks from happening. Like:

    • Disable xmlrpc (Security > Settings > Advanced > WORDPRESS TWEAKS)
    • Enable the Hide Backend feature (Security > Settings > Advanced > HIDE BACKEND).

    In general don’t manually delete any data from the iTSec plugin tables. Use the DAYS TO KEEP DATABASE LOGS setting to control how much data is stored in the logs table and then let the plugin handle it. Other than that make sure to configure the iTSec plugin properly 😉

    • This reply was modified 1 year, 3 months ago by nlpro.
    Thread Starter hildansju

    (@hildansju)

    thanks for the help. I did those two things. the first one Disable xmlrpc was already on, the 2nd one, I enabled it.

    should this now lower the size of the file?

    Hi @hildansju,

    No, though in future it will definately help have more control over the size of the logs table.

    How to lower the (any) table size (after rows are deleted) is more a MySQL database management question. So I did some googling and found an interesting thread on this topic here.

    Thread Starter hildansju

    (@hildansju)

    thank you for the response. Just a question, in general, how large should be the itheme file ? after changing some things here and there it lost about 500 mb but its still 2.2 gb which is astonishingly large. its by far the largest file in my database. do I have to do what the thread on this topic you shared?


    Hi @hildansju,

    Not 2.2 Gb, that’s for sure.

    Yes, the thread I shared contains some actions that you can perform in MySQL (like running the optimize table command).

    Personally I like the last method mentioned in the thread, that creates a new table using like and then copies the data from the old table into the new table. Then the old table is renamed and the new table renamed to the correct iTSec logs table name. Finally the old table is deleted.

    Try (if not already) optimizing the table. If that does not have the desired effect, give the create-new-and-delete-old-table method a go.

    There is a log cleaner plugin for iThemes Security.

    https://wordpress.org/plugins/log-cleaner-for-ithemes-security/

    Plugin Support Shalom Taiwo

    (@shalomt)

    Hi @hildansju ,

    I hope the information provided helped resolve your issues. I will mark this post as resolved. If you still need some assistance, please feel free to open a new support topic, and we would be happy to assist.

    Thank you!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘iTHEME Log files size is 2.7 gb, HUGE ISSUE’ is closed to new replies.