• Resolved Daniel

    (@damen02)


    Hi.

    I noticed my database have become huge because of AIOS.
    The aiowps_audit_log table takes nearly 80% of my database.

    I checked the Audit Logs tab and noticed that there are more than 65.000 registers in three moths. Almost all of them are failed access. This is very unusual.

    How ca I prevent database bloating?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Support hjogiupdraftplus

    (@hjogiupdraftplus)

    Hi @damen02

    If invalid login attempt is the issue you can rename the login page.

    In wp-admin ( Admin panel) Go to WP Security > Brute force > Rename login page tab > Enable rename login page ( Please remember next time that url to be used to login )

    Also enable captcha WP Security > Brute force > Captcha settings tab – Select the captcha type and enable captcha for login page.

    For increased audit log records you may define below constant to 30 ( or less also for example 10 )

    define(‘IOWPSEC_PURGE_AUDIT_LOGS_AFTER_DAYS’, 30); in wp-config.php

    It will delete audit log related table data older than 30 days, right now it is default 90 days

    Regards

    Plugin Support hjogiupdraftplus

    (@hjogiupdraftplus)

    Hi @damen02

    The constant is AIOWPSEC_PURGE_AUDIT_LOGS_AFTER_DAYS , In above reply by mistake ‘A’ was missing.

    define(‘AIOWPSEC_PURGE_AUDIT_LOGS_AFTER_DAYS’, 30); in wp-config.php

    Regards

    Thread Starter Daniel

    (@damen02)

    Hi @hjogiupdraftplus, thanks for your answer!

    I will follow your suggestions and then I will tell you the results.

    Regards

    Plugin Support hjogiupdraftplus

    (@hjogiupdraftplus)

    Hi @damen02

    Ok, let me know if it is helpful.

    Regards

    I have the same problem. If I copy the given here, the website throws a 500 server error and is no longer accessible.
    I would like to limit the records to 5 days as the database occupies more than 100MB at 90 days for AIOS only

    Plugin Support hjogiupdraftplus

    (@hjogiupdraftplus)

    Hi @chicharron

    500 error might be due to copied direct and issue of single quote please copy from below.

    define('AIOWPSEC_PURGE_AUDIT_LOGS_AFTER_DAYS', 30); 

    thx! Now it works

    Is there a possibility in the database (if I am logged into the SQL database) to delete well over 100,000 entries in one go? Or do I have to delete the 500 entries from the system?

    Plugin Support hjogiupdraftplus

    (@hjogiupdraftplus)

    Hi @chicharron

    If you have sql database and want to delete all also not a problem. It is advisable to backup the audit log table.

    Regards

    Yes, I had looked at the last 5 days, nothing out of the ordinary.
    Thank you for the quick support. Speaks for a purchase if it’s Black Week or promo days ??

    Thread Starter Daniel

    (@damen02)

    Hi @hjogiupdraftplus, thanks for your assistance.

    I added the code you provide in wp-config.php. This hadn’t any effect during the same day, but 3 days later it reduced noticeably the list on the plugin’s Audit log page.

    However, the database remains bloated, doesn’t reduce at all.

    How can I restore it to the previous size?

    Plugin Support hjogiupdraftplus

    (@hjogiupdraftplus)

    Hi @damen02

    Below defined constant AIOWPSEC_PURGE_AUDIT_LOGS_AFTER_DAYS means logs older than 30 days will be deleted so it will depend on the last 30 days logged number of audit log records. you can reduce it to 10 so it will have only last 10 days audit log records.

    define('AIOWPSEC_PURGE_AUDIT_LOGS_AFTER_DAYS', 30); 
    
    Thread Starter Daniel

    (@damen02)

    Hello, I will extend myself to be more clear:

    The code I used in wp-config.php was this:

    define('AIOWPSEC_PURGE_AUDIT_LOGS_AFTER_DAYS', 10);

    The log listing in the “Audit Logs” tab shows the last 10 days, as expected.

    BUT! The aiowps_audit_log database table still contains the logs older than 90 days.

    This AIOS table occupies more than 80% of the database of a website with more than 500 variable products. Not only did it not reduce in size but it continues to increase.

    This time I solved it by optimizing the table with phpMyAdmin, but I wonder if I should do this periodically to keep the database with an acceptable size.

    This is a bug for me. The plugin should not occupy 80% of the database, or in any case offer a way to clean it without technical knowledge.

    Plugin Support aporter

    (@aporter)

    Hi,

    The contents of the “Audit log” tab comes directly from the database table {prefix}aiowps_audit_log.

    If it only shows entries from the last 10 days thats because theres only 10 days of content in the database (as would be expected with the above define value).

    Do you somehow have multiple aiowps_audit_log tables?

    You can also easily clear the audit log table from the “Audit log” tab.

    The table has a “bulk actions” dropdown, in there is a “Delete all” option.

    Select that option and press apply, that will remove every entry from the table.

    Best Wishes,

    Ashley

    I am using define('AIOWPSEC_PURGE_AUDIT_LOGS_AFTER_DAYS',1);

    but see no effect on the current Event Log, must I wait x days or is 1 too small?

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Audit log bloats database’ is closed to new replies.