• Resolved zuykis

    (@zuykis)


    Hi,

    in one of my project the database’s table ‘_aiowps_global_meta’ has aroun 400MB of data and I think this is way too much comparing to another projects same table size.
    I made an assumption this is due to file scanner module and that it stores some file lists there for comparison so I tried to re-scan, deactivate this module/function, scan when periodical scanner is disabled, even to disable/enable AIOWPS plugin itself but nothing worked to decrease table’s size and the table is always around 400MB when it should be way smaller like 10MB or so.

    The project is not very large, it has few thousand files in /uploads/ (around 300MB).
    This issue appeared in a period from Oct 28 to 4 Nov as I see previous database backup versions are normal size and only the last was enormous.

    My guess is that there should be some bug made or incompatibility between WP version (which was updated automatically) and AIOWPS’s version itself (plugin wasa not updated automatically).
    Also no major changes on this project were done or anything similar during the period when database increased dramatically.

    I have many other WP projects with AIOWPS plugin and all are OK so this situation is strange…

    I am not worried too much but anyway it’s not a good practice to have such a big tables in older versions of MySQL so what should I do in order to clean that exact table or reset scanner module?
    Simply delete the table row or what?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi,

    The plugin has a code which will periodically check the tables created by aiowps and it will cleanup any table which has more than 5000 rows, ie, the code will delete the oldest rows and keep the newest 5000. The “5000” rows is set as a default in the code. However the developers have also added filters to allow you to be able to set your own value.

    The filters can be found in the wp-security-backup.php file in the function called aiowps_scheduled_db_cleanup_handler.

    The cleanup process is triggered once daily using the inbuilt WordPress “wp_schedule_event”.
    One way to trigger the cleanup process immediately is to deactivate and activate the aiowps plugin which should kick off the scheduled event.

    To use the filters you should not edit any of this plugin’s files but instead you will need to add some code to your theme’s functions.php file.

    For example:

    add_filter( 'aiowps_max_rows_event_table', 'change_table_rows_remaining', 10, 1 );
    add_filter( 'aiowps_max_rows_failed_logins_table', 'change_table_rows_remaining', 10, 1 );
    add_filter( 'aiowps_max_rows_login_attempts_table', 'change_table_rows_remaining', 10, 1 );
    add_filter( 'aiowps_max_rows_global_meta_table', 'change_table_rows_remaining', 10, 1 );
    
    function change_table_rows_remaining( $rows ) {
    	return '1000';
    }

    The above will set the maximum number of rows to keep for all of the tables to 1000.

    Let me know if the above helps you.

    Kind regards

    Thread Starter zuykis

    (@zuykis)

    Hi mbrsolution,

    Unfortunately the method of setting filter limits was not effective at all.
    Maybe I didn’t clarified that all that 400MB of data contains only one row in a table ‘_aiowps_global_meta’ and no any other rows exist in that table.
    What else might be working.
    What if I would disable the scanner module at all -> then disable the plugin -> then delete that row -> and finally reactivate the plugin again?

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi,

    What if I would disable the scanner module at all -> then disable the plugin -> then delete that row -> and finally reactivate the plugin again?

    I guess you cold try that. But make sure you create a database backup first just in case something happens.

    Kind regards

    Thread Starter zuykis

    (@zuykis)

    Just FYI deletion of the row worked smoothly, although I didn’t try to use the scanner module again after the plugin was reactivated.

    Thank you for your sincere help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Database is way too big due to AIOWPS’ is closed to new replies.