Page 1 of 1

zoneminder status returns - The table 'Logs' is full

Posted: Fri Aug 29, 2014 6:04 pm
by vinceskahan
I spun up a new zoneminder VM on Ubuntu with a 32GB disk and it took only a couple days to fill the disk. When I run zoneminder status, it returns

Code: Select all

DBD::mysql::st execute failed: The table 'Logs' is full at /usr/share/perl5/ZoneMinder/Logger.pm line 609
which is indeed true. The / partition is full.

I can't do anything via the gui to clean up things, as it returns a popup saying

Code: Select all

Can't write log entry 'insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( 1409335374.894321, 'web_php', 6812, -3, 'FAT', 'SQL-ERR \'Got error 28 from storage engine\', statement was \'select E.Id,E.MonitorId,M.Name As MonitorName,M.DefaultScale,E.Name,E.Width,E.Height,E.Cause,E.Notes,E.StartTime,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived from Monitors as M inner join Events as E on (M.Id = E.MonitorId) where 1 and ( E.StartTime < \'2014-08-29 11:02:54\' ) order by E.StartTime asc\'', '/usr/share/zoneminder/includes/database.php', 78 )': The table 'Logs' is full
Questions:
  • how do I clear it so I can restart zoneminder
  • how do I prevent it happening in the future
  • what cron jobs should I have to maintain the system hands-off
My installation has two cameras. One is set to monitor and the main wifi camera is set to Mocord. This particular location has a lot of moving things (hanging plants) and shadows come+go a lot so setting it to record on just motion probably doesn't work in this location. Likely best to record always and highlight motion, with a quick self-deletion....

Any ideas ?

Re: zoneminder status returns - The table 'Logs' is full

Posted: Tue Sep 02, 2014 1:59 pm
by bbunge
You need to set a filter called PurgeWhenFull and set it to run in the background. By default it is set to delete events when the disk is 95% full. It will remove the events from the database and zmaudit will run and remove the images. As for your current problem try deleting some of the images manually.
bb

Re: zoneminder status returns - The table 'Logs' is full

Posted: Tue Sep 02, 2014 11:42 pm
by vinceskahan
bbunge wrote:You need to set a filter called PurgeWhenFull and set it to run in the background. By default it is set to delete events when the disk is 95% full. It will remove the events from the database and zmaudit will run and remove the images. As for your current problem try deleting some of the images manually.
bb
Not to be overly dense, but 'how' do I set it to run in the background ? The gui method didn't work because the / partition was totally full. It wasn't the logs table that was full (as far as I could tell), it was the disk full of events. To clear things I deleted all the events manually and stuff restarted.

So I'm looking for how to prevent it in the future......

Re: zoneminder status returns - The table 'Logs' is full

Posted: Sat Sep 06, 2014 1:22 pm
by bbunge