Log keeps growing

Forum for questions and support relating to the 1.30.x releases only.
Locked
evolotion
Posts: 46
Joined: Mon Aug 01, 2016 9:03 pm

Log keeps growing

Post by evolotion »

Currently at 536360 items, have changed "LOG_DATABASE_LIMIT" to 1000 rather than "7 day" restarted then left it a few hours to let the audit thingy do its business, but still the log remains huge. Would like to manually purge then have a limit set, any sql whizkids know how? I did find an old thread form ~2009 but commands didnt work for me.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Log keeps growing

Post by bbunge »

You may have to wait a day for the log to purge. Might be best to set it to "1 day" vice "1000"
evolotion
Posts: 46
Joined: Mon Aug 01, 2016 9:03 pm

Re: Log keeps growing

Post by evolotion »

have done as suggested but got impatient to see if itd work. so for others, to manually clear the log:

sudo mysql --password=YOURPASSWORD

USE zm

truncate table Logs;

quit

I havnt the foggyest how mysql works and used the fix from Linwood here : viewtopic.php?t=20758 to make this work, naturally his one liner is more elegant but I was fumbling around the mysql prompt with show datablase and show tables etc as didnt understand why it wasnt working.

EDIT I should add I have no doubt some serious damage could be done in mysql to zoneminder and anythign else that uses it (owncloud in my case) so be very very very carefull before you press that enter key.
evolotion
Posts: 46
Joined: Mon Aug 01, 2016 9:03 pm

Re: Log keeps growing

Post by evolotion »

OK been running a few days now log still has data from the 19th onwards when I manually cleared despite being set to "1 day". The logs are invaluable for debugging and setup, but cant afford them to grow indefinately, Any input appreciated.
Locked