Database Log not purging

Forum for questions and support relating to the 1.30.x releases only.
Post Reply
bbunge
Posts: 2442
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Database Log not purging

Post by bbunge » Wed Jun 19, 2019 4:29 pm

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

bbunge
Posts: 2442
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Solved: Database Log not purging

Post by bbunge » Thu Jun 20, 2019 12:04 am

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. :-)

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests