• Resolved brt

    (@brt)


    if filescan is activated, the list of all found files is squeezed into one serialized string of several megabytes (aiowps_global_meta.meta_value4).

    this may work without problems if you have a very, very small site, but if you have a bunch of plugins and one or more complex theme(s) you will end up with a single row containing more data then all the rest of your database, leading to a situation where your are not able to dump/backup your database anymore because you will hit: Got packet bigger than ‘max_allowed_packet’. failing database backups is a serious problem. you may truncate the table or delete the row but after the next scan you will be in trouble again. you could also raise max_allowed_packet but i doubt that is reasonable.

    it is getting even worse on a multisite installation, i witnessed a situation where the problem got duplicated to each and every site within the multisite installation, the same data everywhere. this single row tremendously bloats the database. (an almost 2GB database was down to a few hundred MB after truncating and optimizing all the aiowps_global_meta tables)
    i understand, that this may only happen if you export/import the settings from your main site, but if you have a couple of sites this is what you do: setting up your main site and copy over all the setting to your subsites. i love that feature, it safes you so much time.

    sadly, the only real solution is to switch off filescan.

    AIOWPS is an awesome collection of tools, enhancing wordpress security in many aspects, but the filescan as it is now, feels like the opposite because it is leading to failing database backups, and using an absurd amount of databasememory/RAM.

    IMHO AIOWPS should put out a warning regarding this problem, or at least ensure that the scan will never run on subsites, even with imported settings, as it makes no sense at all scanning the same files again and again etc.

    i know this issue has already been reported years ago, and obviously there is no fix for it until now, so maybe it might simply be better to remove that feature completely? chances are too high you will run into troubles with this feature enabled, it may work today but its just a matter of time, sooner or later you will reach max_allowed_packet. if someone wants a filescan, tools like “tripwire” may do a better job without risking database troubles.

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

    (@mbrsolution)

    Hi, thank you for your extensive review and report regarding this feature Enable Automated File Change Detection Scan:.

    but the filescan as it is now, feels like the opposite because it is leading to failing database backups, and using an absurd amount of databasememory/RAM.

    I understand what you mean however no one has reported this as far as I know.

    i know this issue has already been reported years ago, and obviously there is no fix for it until now, so maybe it might simply be better to remove that feature completely?

    Can you share a link to the support thread that reported this issue. I am curious to know more about this.

    Thank you

    • This reply was modified 5 years, 3 months ago by mbrsolution.
    Thread Starter brt

    (@brt)

    this is the mentioned thread:
    Database backup problems because of file change detection functionality

    is there a notification when the database backup fails?

    i am using automysqlbackup and get notifications by email in case of a failing backup, maybe users just do not notice when their database backup fails? i never got a warning of failing db backups within aiowps/wordpress. the dangerous thing is, that at the beginning, when you set it up, everything may work nicely all the time until you reach the limit, and then backups will silently fail.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi,

    is there a notification when the database backup fails?

    No. There is an e-mail sent to the admin when changes are detected when you add an e-mail in the following field Send Email When Change Detected:.

    if filescan is activated, the list of all found files is squeezed into one serialized string of several megabytes (aiowps_global_meta.meta_value4).

    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 but I have also added filters for this 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.

    Let me know if the above helps you.

    Kind regards

    • This reply was modified 5 years, 3 months ago by mbrsolution.
    Thread Starter brt

    (@brt)

    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,…

    5000 rows would be no problem, the problem is: all the file information (thousands-of files!) is stored in one single row. and this single row is getting so big, that database backups start silently failing.

    i do not see how mentioned cleanup process could help in this case.

    • This reply was modified 5 years, 3 months ago by brt.
    Plugin Contributor mbrsolution

    (@mbrsolution)

    I understand what you mean. I have submitted a message to the developers to investigate further your issue.

    Thank you

    Im getting the same message from my host that the row in the Database is to big to backup.

    How do we fix it?

    Thread Starter brt

    (@brt)

    Im getting the same message from my host that the row in the Database is to big to backup.

    How do we fix it?

    you could delete the row, but you will also have to ensure, that it will not be recreated that big by the next filescan. you could try to limit the number of scanned files by adding appropriate patterns to the exclude list, but that could end up in endless trial and error.

    IMHO filescan as it is implemented now is dangerous therefore i recommend to delete the row and disable this feature completely. when filescan is activated, sooner or later you will get into the situation were database backups will (silently) fail. this happens when the number of scanned files is to big as the information for all files will be stored in a column of one single row. there will be no warning within wordpress, and you will have no database backup.

    I cant see a opion in the settings how to disable filescan, Where can i find that.

    The row is now 103 MB in size.

    Thread Starter brt

    (@brt)

    WP Security -> Scanner
    -> File Change Detection Settings
    uncheck “Enable Automated File Change Detection Scan:”

    Ummm this was disabeld

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi,

    I wanted to let you know the developers have done some work and made some changes to improve this feature. It might come out in the next release.

    @eemskrant, can you start a new support thread. It is much easier for us to manage one issue per user.

    Thank you

    Plugin Contributor mbrsolution

    (@mbrsolution)

    @brt, have you tested the latest plugin version? Can you let us know if your issue is resolved?

    Thank you

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘aiowps_global_meta preventing database backups / dump’ is closed to new replies.