Page 1 of 1

Database Log not purging

Posted: Wed Jun 19, 2019 4:29 pm
by bbunge
Zoneminder on Bionic with Mariadb. Had an issue last week with the quad core CPU running over 80% while it normally runs 15-40% Investigating I discovered the zm database over 10GB! Increasing the innodb_buffer_pool_size calmed the processor but furthur research showed the zm/log table over 7GB. The log settings were to purge the log at "2 day" (the default is "7 day"). I was able to empty (truncate) the log table with phpmyadmin which reduced the zm database to below 3GB which is not too bad for over 70K events stored.
Am watching the zm log and seeing the number of records increasing but not being purged at the "2 day" setting. I suspect a corrupt database but thought I would throw this out for comment in aces I've missed the obvious or...

bb

Solved: Database Log not purging

Posted: Thu Jun 20, 2019 12:04 am
by bbunge
Looks like I solved my own problem.
With OPT_FAST_DELETE enabled, zmaudit.pl was not able to clean out enough files in the 900 seconds between runs, specified by AUDIT_CHECK_INTERVAL, to get to the log prune which happens at the end of the zmaudit.pl run. So, the log file built up and the hard drive was filling up.
Am running zmaudit.pl in a command prompt and it is busily removing files that do not exist in database. :-)