Log table is 26GB!

I’ve come to perform a backup before upgrading a 1.7.5 install and it’s been taking hours - literally hours, to backup the database. I’ve connected to MySQL with workbench and the log table is 21.5 GB and contains 152,728,302 rows. The index is 3GB!

I like to slim the table down considerably, can anyone tell me how? I’d like to know what exactly it’s logging, but for now, I’ll make do with just deleting it all :slight_smile:

Thanks
Andy

Did you have debugging on for a long time or something like that?
It should not create so much logs without it.

You can truncate the log table, even from the web ui -> Logs page.

Hi,

How can i tell if debugging is on? I don’t think debugging was enabled deliberately…

I’ll check the GUI for the logs page.

You can navigate to Settings -> Troubleshooting tab
there is ‘log level’ there, if the debugging is enabled it will be set to ‘audit’, which can generate quite a lot of logs.

Peter,
what is the proper way to prevent large log files?
is it “error” ?

Yes, I believe it’s set to error with auditing switched off.

Thanks :smiley:
I have just checked my server and it is set to “error” because i had the same issue a while back and fixed it.

Thanks for the replies.

Yes Audit logging was active and it’s now on Error, and the truncate function has removed all the log history.

Case closed I think :smile:

Andy

As a side note, the maintenance routine will clear up these logs. If they have built up to such a size I would suggest that you do not have maintenance configured correctly.

Thanks,
Dan